Bug 2216849
| Summary: | dnf5 owns wrong directories in /var/cache | |||
|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Vít Ondruch <vondruch> | |
| Component: | dnf5 | Assignee: | rpm-software-management | |
| Status: | CLOSED RAWHIDE | QA Contact: | ||
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | rawhide | CC: | jkolarik, nsella, pkratoch, ppisar, rpm-software-management | |
| Target Milestone: | --- | Keywords: | Triaged | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2221663 (view as bug list) | Environment: | ||
| Last Closed: | 2023-07-10 10:57:15 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
|
Description
Vít Ondruch
2023-06-22 20:31:27 UTC
/var/cache/libdnf5 is only used by DNF5. /var/cache/libdnf is used neither by DNF5, nor DNF4. /var/cache/dnf directory is only used by DNF4. You are right that libdn5 package should own /var/cache/libdnf5 instead of /var/cache/dnf. This has been fixed in upstream fives days ago <https://github.com/rpm-software-management/dnf5/commit/f33e35aadbd1b71d0ff8d6f4ec36493db9ee3ead>. I guess this will be addressed in a next Fedora build. I guess /var/cache/dnf was left orphaned on your system after uninstalling dnf. Keeping nonempty directories is a standard RPM behavior. Removing that tree could be achieved with an RPM postuninstallation script, but this is not a typical approach used in Fedora. The files are usually kept there for case a user would install the package again. (In reply to Petr Pisar from comment #1) > I guess /var/cache/dnf was left orphaned on your system after uninstalling > dnf. Keeping nonempty directories is a standard RPM behavior. Removing that > tree could be achieved with an RPM postuninstallation script, but this is > not a typical approach used in Fedora. The files are usually kept there for > case a user would install the package again. I am not sure if the cache directory content was changed, but: 1) I would expect that the same directory is still used. 2) If that is not possible due to format change, then I'd expect that the data are migrated. It might not sound useful, but running Rawhide, the cache might be the most convenient place to get the older version of package which used to work. I think I have proposed somewhere, that DNF should consider the cache for updates/downgrades, which unfortunately was not implemented (yet). But this is out of scope of this ticket. Changing status to post because the issue is fixed in upstream. See comment 1. The patch will be released next week. (In reply to Jaroslav Mracek from comment #3) > Changing status to post because the issue is fixed in upstream. See comment > 1. The patch will be released next week. Sorry, but: 1) The upstream fix will leave behind yet another directory 2) I have provided more thought on this topic. Could you please elaborate? Is the cache compatible or not? Can it be reused? Sorry, I can't answer your questions, Vít, but the aforementioned patch is part of bodhi update https://bodhi.fedoraproject.org/updates/FEDORA-2023-3f321278b5 (I didn't realize that for releases which haven’t yet reached the activation point, bugs can be associated to bodhi updates only by adding keywords to the changelog in the build, and not after that, so, I will handle this manually.) |