Step 7 of 8 · lab · 25 min
Upgrade a package without losing its setting
Release 2.0-1 of a training reporter is approved and its archives are on the machine. Upgrade the program and its dependency without losing the local setting or the note.
Situation
An isolated machine runs a training reporter, lab-pkg-report version 1.0-1, together with the
data package lab-pkg-data. Running lab-pkg-report prints the versions and the operating mode.
The mode is a local setting here: /etc/lab-pkg-report.conf says mode=training. Release 2.0-1
is approved, and the archives of both packages have already been delivered to
/srv/package-lab. The user keeps a note in ~/pkg-notes/report.txt.
Task
lab-pkg-reportis installed and configured at version 2.0-1 — asdpkgsees it.lab-pkg-datais installed at version 2.0-1, andlab-pkg-report's dependency is met.- Both packages' files come from release 2.0-1, and
lab-pkg-reportrun asstudentprintsreport=2.0-1 data=2.0-1 mode=training. /etc/lab-pkg-report.confstill saysmode=trainingand remains the package's conffile.- The note
~/pkg-notes/report.txtis intact: same contents, owner and modes. - Other packages, APT sources and indexes, and the archives in
/srv/package-labare unchanged.
Constraints
- There's no internet; no need to refresh indexes or upgrade system packages.
- Don't bypass dependencies with
--force-…options or edit thedpkgdatabase by hand. - Don't remove packages together with their configuration (
purge): the local setting is needed.
The tools you need are already installed. There's no internet on this machine.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 6-
lab-pkg-report is installed and configured at version 2.0-1 — not done yet
-
lab-pkg-data is installed at version 2.0-1 and report's dependency is met — not done yet
-
Package files come from release 2.0-1, and the program run as student prints the new report — not done yet
-
/etc/lab-pkg-report.conf kept mode=training and is still the package's conffile — not done yet
-
The note in ~/pkg-notes is intact with the same owner and modes — not done yet
-
Other packages, APT and the supplied archives are unchanged — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 6-
lab-pkg-report is installed and configured at version 2.0-1 — not done yet
-
lab-pkg-data is installed at version 2.0-1 and report's dependency is met — not done yet
-
Package files come from release 2.0-1, and the program run as student prints the new report — not done yet
-
/etc/lab-pkg-report.conf kept mode=training and is still the package's conffile — not done yet
-
The note in ~/pkg-notes is intact with the same owner and modes — not done yet
-
Other packages, APT and the supplied archives are unchanged — not done yet
Goals are checked on the machine after every command.