Implementing a --dry-run functionality so we can work on prunerepo much easier.
--dry-run
[jkadlcik@chromie prunerepo]$ ./prunerepo /tmp/fedora-28-i386/ --dry-run Removing obsoleted packages... Executing: dnf repoquery --repofrompath=prunerepo_query,/tmp/fedora-28-i386 --repo=prunerepo_query --refresh --queryformat="%{location}" --quiet - Executing: dnf repoquery --repofrompath=prunerepo_query,/tmp/fedora-28-i386 --repo=prunerepo_query --refresh --queryformat="%{location}" --quiet Removing: /tmp/fedora-28-i386/00003197-hello/hello-2.8-1.fc28.src.rpm Removing: /tmp/fedora-28-i386/00003197-hello/hello-2.8-1.fc28.i686.rpm Removing: /tmp/fedora-28-i386/00003196-hello/hello-2.8-1.fc28.src.rpm Removing: /tmp/fedora-28-i386/00003196-hello/hello-2.8-1.fc28.i686.rpm Removing: /tmp/fedora-28-i386/00003197-hello/hello-2.8-1.fc28.src.rpm Removing: /tmp/fedora-28-i386/00003197-hello/hello-debuginfo-2.8-1.fc28.i686.rpm Removing: /tmp/fedora-28-i386/00003196-hello/hello-2.8-1.fc28.src.rpm Removing: /tmp/fedora-28-i386/00003196-hello/hello-debuginfo-2.8-1.fc28.i686.rpm Removing: /tmp/fedora-28-i386/00003197-hello/hello-2.8-1.fc28.src.rpm Removing: /tmp/fedora-28-i386/00003197-hello/hello-debugsource-2.8-1.fc28.i686.rpm Removing: /tmp/fedora-28-i386/00003196-hello/hello-2.8-1.fc28.src.rpm Removing: /tmp/fedora-28-i386/00003196-hello/hello-debugsource-2.8-1.fc28.i686.rpm Recreating repository... Executing: /usr/bin/createrepo_c --database --update --local-sqlite --cachedir /tmp/ --workers 8 /tmp/fedora-28-i386/ [jkadlcik@chromie prunerepo]$ ls /tmp/fedora-28-i386/00003197-hello/hello-2.8-1.fc28.src.rpm /tmp/fedora-28-i386/00003197-hello/hello-2.8-1.fc28.src.rpm
While the mentioned files are not removed.
[jkadlcik@chromie prunerepo]$ ls /tmp/fedora-28-i386/00003197-hello/hello-debuginfo-2.8-1.fc28.i686.rpm /tmp/fedora-28-i386/00003197-hello/hello-debuginfo-2.8-1.fc28.i686.rpm
What about using srpm_path here instead of evaluating the expression again.
srpm_path
rebased onto 1f4ecb9bbfc169f85dd06d6cca7b77c429e2bf54
I totally missed that. Thank you. Fixed.
Thanks!
Pull-Request has been merged by clime
This PR has been migrated to GitHub as a placeholder issue: https://github.com/fedora-copr/prunerepo/issues/3
Implementing a
--dry-runfunctionality so we can work on prunerepo much easier.While the mentioned files are not removed.