Bug 2467655 - offline update state not invalidated after `dnf update`
Summary: offline update state not invalidated after `dnf update`
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 44
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: ---
Assignee: Marek Blaha
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-05-07 07:45 UTC by Flo H.
Modified: 2026-08-22 01:24 UTC (History)
8 users (show)

Fixed In Version: dnf5-5.4.3.0-1.fc44 dnf5-5.4.3.0-2.fc44
Clone Of:
Environment:
Last Closed: 2026-08-22 01:24:05 UTC
Type: ---
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)
screenshot (153.46 KB, image/png)
2026-05-07 07:47 UTC, Flo H.
no flags Details
same screenshot but changed system language to EN (152.34 KB, image/png)
2026-05-07 07:52 UTC, Flo H.
no flags Details

Description Flo H. 2026-05-07 07:45:40 UTC
Gnome Software shows that everything is-up-to date and metadata being refreshed.

On shutdown dialog, Gnome asks if updates should be installed offline, despite system being up-to-date.



Reproducible: Always

Steps to Reproduce:
1. Start Gnome Software
2. Update packages
3. shutdown by clicking through Gnome buttons
Actual Results:
Its asking whether updates should be installed offline

Expected Results:
Dont ask, system is already up to date.

Comment 1 Flo H. 2026-05-07 07:47:44 UTC
Created attachment 2139966 [details]
screenshot

Comment 2 Flo H. 2026-05-07 07:52:37 UTC
Created attachment 2139980 [details]
same screenshot but changed system language to EN

Sorry, system language was German before, I switched to EN to provide you with a proper screenshot

Comment 3 Milan Crha 2026-05-07 08:41:21 UTC
Thanks for a bug report. It looks like the dnf5daemon-server "thinks" it still has some updates to apply.

How did you do the last update, please? Maybe the dnf5daemon-server or dnf command line failed to clean-up the offline update state for some reason.

If you can still reproduce, what does /usr/lib/sysimage/libdnf5/offline/offline-transaction-state.toml contain, please?

Comment 4 Flo H. 2026-05-07 11:54:45 UTC
I used dnf update to update my system.

Unfortunately, I can't reproduce, and I have since restarted the VM. Will keep an eye on it and post /usr/lib/sysimage/libdnf5/offline/offline-transaction-state.toml should the problem re-appear.

Comment 5 Milan Crha 2026-05-07 12:57:19 UTC
Thank you for the update. I tried it here with dnf5-5.4.2.0-1.fc44.x86_64, the toml file is not created with `dnf update`, it is created only with `dnf update --offline`. When I do not reboot the machine and run `dnf update`, then the gnome-software properly shows there are no package updates, but the toml file is still there, with state `download-complete`, which is an indication "the update is prepared, it can be scheduled for the next boot". That's noticed in the gnome-shell restart/power-off dialog and you get what you see. The gnome-software prepares offline updates under the hood, thus you did not necessarily need to run `dnf update --offline`, it could be the gnome-software preparing the offline update, then you "overwrote" it with the `dnf update`.

I'm moving this to the dnf5 folks, the problem is that the plain `dnf update`, or any other non-offline updates invoked through the dnf command line, should invalidate the prepared offline update, or at least not claim in the offline-transaction-state.toml that the packages are downloaded (even they can be downloaded, it's just that they are not meant to be installed, because they are already installed).

Comment 6 Petr Pisar 2026-05-07 13:20:07 UTC
Or dnf5 could to it other way around: reject any modifying operation if an offline update is scheduled.

Comment 7 Milan Crha 2026-05-07 13:29:46 UTC
I vaguely recall seeing some warning or such about prepared previous offline update, but maybe it shows up only with `dnf update --offline`. I'm sorry, I do not recall any better details.

Comment 8 Petr Pisar 2026-05-07 13:32:41 UTC
Yes, stacking multiple offline updates is already prevented.

Related upstream request <https://github.com/rpm-software-management/dnf5/issues/1655> actually requesting more sharing.

Comment 9 Milan Crha 2026-05-07 14:16:51 UTC
This is not much about sharing (downloaded packages, or cache with the command line and dnf5daemon-server), this is more about invalidating offline update state when the update was done by other means (dnf update/distro-sync/you-name-it).

PackageKit is sometimes "overaggressive" with invalidating prepared offline updates, even it may make sense when a package is added or removed, even it would be nice to rather not panic in such case when applying the prepared offline update, which may contain packages which are not installed on the machine anymore.

Comment 10 Marek Blaha 2026-06-02 09:10:32 UTC
Should be fixed upstream by https://github.com/rpm-software-management/dnf5/pull/2736

Comment 11 Fedora Update System 2026-08-18 14:22:25 UTC
FEDORA-2026-958b875d17 (dnf5-5.4.3.0-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-958b875d17

Comment 12 Fedora Update System 2026-08-19 01:39:57 UTC
FEDORA-2026-958b875d17 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-958b875d17`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-958b875d17

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2026-08-20 16:39:11 UTC
FEDORA-2026-958b875d17 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-958b875d17`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-958b875d17

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2026-08-22 01:24:05 UTC
FEDORA-2026-958b875d17 (dnf5-5.4.3.0-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.