-
Notifications
You must be signed in to change notification settings - Fork 159
/
offline-updates.txt
88 lines (73 loc) · 3.49 KB
/
offline-updates.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
OFFLINE UPDATES USING PACKAGEKIT AND SYSTEMD
This functionality adds the offline updates feature to PackageKit as
described in the following URL:
https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html
What to do if you're a backend:
* If the transaction_flags contain PREPARE then download all the
metadata and packages for the transaction, but don't actually apply
the transaction.
What to do if you're a frontend:
* If the /var/lib/PackageKit/prepared-update file exists then offer
the user to:
- Restart & Install Updates
- Suspend
rather than just:
- Suspend
* If the user clicks "Restart & Install Updates" then execute
'pkcon offline-trigger' and then restart the computer the usual
way.
On the next reboot, the updates will be installed, and the computer
will be restarted again.
The /var/lib/PackageKit/prepared-update file will be automatically
removed if the offline update succeeded, but the offline update will
only be attempted once.
The /var/lib/PackageKit/offline-update-competed file will be created
once the '/usr/libexec/pk-offline-update' program has been run by
systemd. For failure, the file will contain the following:
"""
[PackageKit Offline Update Results]
Success=false
ErrorCode=missing-gpg-signature
ErrorDetails="The GPG signature 0xDEADBEEF is not installed"
"""
For success, the file will contain the following:
"""
[PackageKit Offline Update Results]
Success=true
Role=update-packages
Packages=gimp;2.10.34-1.fc38;x86_64;updates,bash;5.2.15-3.fc38;x86_64;updates
"""
________________________________________________________________________
TESTING OFFLINE UPDATES
* Ensure powertop and colorhug-client are installed and the system is
othewise up to date. Ensure PackageKit-1.0.0 or later is installed.
* Downgrade the powertop and colorhug-client packages on your system so
that you have exactly two updates when you do 'pkcon get-updates'
* Download the new powertop update with:
pkcon --only-download update powertop
* Observe there are no PolicyKit "Authentication Required" dialogs
shown as the command completes.
* Ensure /var/lib/PackageKit/prepared-update contains just the powertop
package in "prepared_ids" variable.
[You can also use 'pkcon offline-get-prepared' to do the same thing]
* Download the new colorhug-client update with:
pkcon --only-download update colorhug-client
* Ensure /var/lib/PackageKit/prepared-update contains both powertop and
colorhug-client packages in "prepared_ids" variable.
* Run 'pkcon offline-trigger' and confirm that the "/system-update"
symlink exists.
* Check that /var/lib/PackageKit/offline-update-action is "reboot"
* Run 'sudo PK_OFFLINE_UPDATE_TEST=1 /usr/libexec/pk-offline-update'
and observe that the two updates are applied
* Confirm that /var/lib/PackageKit/prepared-update has been deleted
* Confirm that /var/lib/PackageKit/offline-update-competed exists,
contains the 2 updated packages in "Packages" variable, and no error
messages have been logged.
[You can also use 'pkcon offline-status' to do the same thing]
* Downgrade powertop and colorhug-client again, and do:
pkcon --only-download update powertop colorhug-client
* Run 'pkcon offline-trigger'
* Reboot, and observe that the updates are applied in the special
packagekit-offline-update.service with plymouth going from 0% to 100%
* Confirm that the system is rebooted into a running system that has
has the updates applied.