Open jmou opened 4 years ago
Considering that there's no way of doing a rpm-ostree uninstall --apply-live
, the only way of upgrading an rpm requires a full reboot.
Didn't realize a lot of people were hitting this. This isn't actually hard to do, and we do something similar for override replacements already (https://github.com/coreos/rpm-ostree/pull/2863). Might take a look at this soon since I've been working a lot in that area.
@jlebon any news ? it's not a blocker but definitely nice to have
The workaround is easy; just rpm uninstall the local package first. But it would be friendlier if rpm-ostree could upgrade the package without this step.
FWIW you can do it in a single transaction:
rpm-ostree install lact-0.5.3-0.x86_64.fedora-39.rpm --uninstall lact
Upgraded:
lact 0.5.2-0 -> 0.5.3-0
Changes queued for next boot. Run "systemctl reboot" to start a reboot
Could you give some love for this opened issue with the most 👍 in this repo and check the proposed answer by @Mershl with multiple packages at once @jlebon. It doesn't seem to work on my side.
The issue with @Mershl solution is that it is not idempotent, we should simply be allowed to upgrade a package from an rpm file/link and if there is no upgrade, do nothing.
The error below should not happen and just update the app if there is an update.
sudo rpm-ostree install --idempotent --assumeyes https://downloads.1password.com/linux/rpm/stable/x86_64/1password-cli-latest.x86_64.rpm
Downloading https://downloads.1password.com/linux/rpm/stable/x86_64/1password-cli-latest.x86_64.rpm...done
Checking out tree 38df155... done
Enabled rpm-md repositories: fedora fedora-cisco-openh264 updates copr:copr.fedorainfracloud.org:atim:starship
Importing rpm-md... done
rpm-md repo 'fedora' (cached); generated: 2024-04-14T18:51:11Z solvables: 74881
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2024-03-12T11:45:42Z solvables: 3
rpm-md repo 'updates' (cached); generated: 2024-07-10T01:50:03Z solvables: 21093
rpm-md repo 'copr:copr.fedorainfracloud.org:atim:starship' (cached); generated: 2024-05-16T08:24:44Z solvables: 2
Resolving dependencies... done
error: Could not depsolve transaction; 1 problem detected:
Problem: cannot install both 1password-cli-2.29.0-1.x86_64 from @commandline and 1password-cli-2.28.0-1.x86_64 from @commandline
- conflicting requests
Some examples with rpm-ostree
version 2024.8
rpm-ostree install foo-1.0.0-1.fc40.x86_64.rpm --reboot
# fails, note new version
rpm-ostree install foo-1.0.1-1.fc40.x86_64.rpm
# works
rpm-ostree install foo-1.0.1-1.fc40.x86_64.rpm --uninstall foo
# fails, note new release
rpm-ostree install foo-1.0.1-2.fc40.x86_64.rpm --uninstall foo
# works
rpm-ostree install foo-1.0.1-2.fc40.x86_64.rpm --uninstall foo-1.0.1-1.fc40.x86_64
# works, note new version
rpm-ostree install foo-1.1.0-1.fc40.x86_64.rpm --uninstall foo
rpm-ostree install bar-1.0.0-1.fc40.x86_64.rpm --reboot
# fails since --uninstall only takes one argument
rpm-ostree install foo-1.2.0-1.fc40.x86_64.rpm bar-1.1.0-1.fc40.x86_64.rpm \
--uninstall foo bar
Thanks for all the testing @mchlstckl
# fails since --uninstall only takes one argument rpm-ostree install foo-1.2.0-1.fc40.x86_64.rpm bar-1.1.0-1.fc40.x86_64.rpm \ --uninstall foo bar
Note you can pass --uninstall
multiple times (so --uninstall foo --uninstall bar
).
When a local package is installed, using
rpm-ostree install
on a newer rpm fails. For example:The workaround is easy; just
rpm uninstall
the local package first. But it would be friendlier if rpm-ostree could upgrade the package without this step.