Bug 1865803
| Summary: | [RFE] allow dnf to run with solv* files only | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Michael Mráka <mmraka> |
| Component: | dnf | Assignee: | amatej |
| Status: | CLOSED ERRATA | QA Contact: | Eva Mrakova <emrakova> |
| Severity: | high | Docs Contact: | Mariya Pershina <mpershin> |
| Priority: | high | ||
| Version: | 8.2 | CC: | amatej, james.antill, ngompa13, nsella |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | dnf-4.4.2-9.el8 | Doc Type: | Enhancement |
| Doc Text: |
.New `fill_sack_from_repos_in_cache` function is now supported in DNF API
With this update, the new DNF API `fill_sack_from_repos_in_cache` function has been introduced which allows to load repositories only from the cached `solv`, `solvx` files, and the `repomd.xml` file. As a result, if the user manages `dnf` cache, it is possible to save resources without having duplicate information (`xml` and `solv`), and without processing `xml` into `solv`.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-05-18 15:00:36 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Michael Mráka
2020-08-04 08:26:33 UTC
I have made a PR: https://github.com/rpm-software-management/libdnf/pull/1076 and tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/905 It should work according to comment 3, If the repomd.xml and solv files are kept dnf can run without downloading the xml metadata. If only the solv files are kept and repomd is also deleted we have to download the whole repository, this could be fixed so that only repomd is downloaded but it would require big change in librepo and since comment 3 mentions its ok to keep repomd I left it like this. filenames.solvx is optional, dnf will work without it (so it works only with repomd and main solv file) but the dependency resolution may fail in some cases where it would succeed with the filenames.solvx present. In general running without the filenames.solvx is problematic (more details here: https://bugzilla.redhat.com/show_bug.cgi?id=1619368#c3) and I am not sure we should allow it but since it has to be explicitly deleted its probably fine. That's great. Thank you Ales. So this is somewhat flawed for cloud images, especially if zck repodata is used, since there's a significant performance improvement if the existing zck repodata files are still preserved. This doesn't currently matter for RHEL, but I could see this becoming a useful optimization in the future. After some internal discussion we decided that my original PR is risky in the sense that it changes core dnf workflow and it could affect a lot of users, instead I made PRs with different possibly even more suitable approach. https://github.com/rpm-software-management/libdnf/pull/1106 https://github.com/rpm-software-management/dnf/pull/1703 These PRs only add a new API function fill_sack_from_repos_in_cache to python3-dnf which is capable of loading repositories without xml metadata present (repomd.xml is still required). It also doesn't check if the metadata are up to date in any way and it doesn't download anything. The idea is to call fill_sack_from_repos_in_cache instead of regular fill_sack. Created a PR with some tests and documentation update: https://github.com/rpm-software-management/dnf/pull/1711 Here is a fixup for the tests: https://github.com/rpm-software-management/dnf/pull/1721 without this they may fail on some systems. Apparently I can't get the tests right, here is another hopefully final fix: https://github.com/rpm-software-management/dnf/pull/1723 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (dnf bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:1657 |