rpm-software-management / dnf-plugins-extras

repository for DNF community plugins
GNU General Public License v2.0
65 stars 62 forks source link

Cleaning up destdir is not necessary, dnf does it (RhBug:2024430) #201

Closed kontura closed 2 years ago

kontura commented 2 years ago

dnf automatically cleans up packages used in a transaction, this can be configured by keepcache option.

cachedir still gets cleaned up completely but it is hardcoded to: var/lib/dnf/system-upgrade and cannot be overwritten.

For: https://github.com/rpm-software-management/dnf-plugins-extras/issues/200 https://bugzilla.redhat.com/show_bug.cgi?id=2024430

kontura commented 2 years ago

Tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/1056

pkratoch commented 2 years ago

Does dnf really clean the packages? When I tried to modify your test to list the files in the downloaddir, the rpm files remained after the upgrade even when I set keepcache=0.

kontura commented 2 years ago

Does dnf really clean the packages? When I tried to modify your test to list the files in the downloaddir, the rpm files remained after the upgrade even when I set keepcache=0.

Oh I see, dnf cleans the packages but we have to preserve the persistor. Thanks for spotting this. I have updated this PR and also the tests to make sure the pacakges are gone.