-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dnf replay
broken since 5.2.10.0-71-g3de835a49
#2183
Comments
I can verify that if I run the It can also be easier to test the |
Version Tested on Fedora 41 using the available `dnf --version` output for broken 5.2.12.0 (`dnf-5.2.12.0-1.fc41.x86_64`)dnf5 version 5.2.12.0 dnf5 plugin API version 2.0 libdnf5 version 5.2.12.0 libdnf5 plugin API version 2.2Loaded dnf5 plugins: name: changelog name: config-manager name: copr name: needs_restarting name: repoclosure name: reposync `dnf --version` output for broken 5.2.11.0 (`dnf-5.2.11.0-1.fc41.x86_64`)dnf5 version 5.2.11.0 dnf5 plugin API version 2.0 libdnf5 version 5.2.11.0 libdnf5 plugin API version 2.2Loaded dnf5 plugins: name: changelog name: config-manager name: copr name: needs_restarting name: repoclosure name: reposync `dnf --version` output for working 5.2.10.0 (`dnf-5.2.10.0-2.fc41.x86_64`)dnf5 version 5.2.10.0 dnf5 plugin API version 2.0 libdnf5 version 5.2.10.0 libdnf5 plugin API version 2.1Loaded dnf5 plugins: name: changelog name: config-manager name: copr name: needs_restarting name: repoclosure name: reposync |
Technically, the --store option is only documented in dnf5-replay(8) manual at there is nothing that implies that packages are predownloaded and that Practically, I understand that predownloading packages is a handy feature. I will try to find which commit broke it. |
For me "dnf5 replay /tmp/foo" does not work at all since 5.2.12.0: It this it needs to download the packages and it downloads them from a wrong URL:
See that it appends a path to the predonwloaded package to a mirror base URL, creating an nonexistent file. |
Thanks for investigation! I'll take a look. |
Because the tests fake transaction.json without |
dnf replay
broken between 5.2.10.0 and 5.2.12.0dnf replay
broken between 5.2.10.0 and 5.2.11.0
dnf replay
broken between 5.2.10.0 and 5.2.11.0dnf replay
broken since 5.2.10.0-71-g3de835a49
OK, it looks like we'll need some more thorough testing. I've identified the root cause of the issue, but I'm not sure it can be fully resolved without making some trade-offs. We're now dealing with two somewhat conflicting requirements:
This isn't a problem for offline transactions, since the Let's take an example: Suppose I run Then I run
One possible solution might be to use a The other option is to allow RPM files to be added to It's also possible to not allow repository packages in the stored transaction, only downloaded RPM files. Then the situation would be similar to the |
If there's an existing repository in the sack with a type different than Repo::Type::COMMANDLINE, it cannot be used to add an RPM file. In such cases, fall back to using STORED_TRANSACTION_NAME as the repository ID instead. Resolves: #2183
In general this seems quite subtle to me, and I don't really have a strong preference here.
It is kind of true but when the package replay (transaction.json) contains I came up with one more possibility: create a new
This seems like the cleanest solution but we loose some functionality. dnf CLI currently cannot create such a stored transaction and although it is possible on the API it is marked as experimental so we might be able to change it if we decide to? |
He, I actually implemented this by mistake when preparing draft #2189 . I was surprised that it works :) |
The following is defined to work, and more complex versions of it seem to be a specifically supported workflow:
Up to and including 5.2.10.0 of
dnf5
this worked as expected, withdnf replay
using the RPMs downloaded into themytransaction/packages/
folder that are also referenced within themytransaction/transaction.json
file itself.However in 5.2.12.0 it does not work. Instead the
dnf replay
command ignores that the packages are already downloaded and available and attempts to download them again fresh.dnf replay
is designed to be used on air-gapped/offline systems to install transactions that had their packages downloaded with them, so this is breakage of the command.The text was updated successfully, but these errors were encountered: