Red Hat Bugzilla – Bug 1064148
DNF attempts to remove packages from local file-based repository
Last modified: 2014-09-30 19:42:08 EDT
Description of problem:
When running 'dnf clean all', dnf tries to remove RPMs from a local repository tree.
Version-Release number of selected component (if applicable):
dnf-0:0.4.13-2.fc20.noarch at 2014-02-09 14:48
Steps to Reproduce:
1. Download some packages and create a local repository tree using createrepo.
$ mkdir /tmp/dnf-test-repo
$ chmod a+r /tmp/dnf-test-repo
$ cp example.rpm /tmp/dnf-test-repo/
$ cd /tmp/dnf-test-repo
$ createrepo -v .
2. Create a repository configuration for it.
$ sudo -s
# cat > /etc/yum.repos.d/dnf-test.repo <<'EOF'
name=DNF Local Test Repository
3. Verify that the repository is being used
$ dnf search example
4. Try to clean DNF data
$ dnf clean all
DNF tries to delete the packages in the local repository.
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-src-184.108.40.206-220.127.116.11.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-javadoc-18.104.22.168-22.214.171.124.fc20.noarch.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-headless-126.96.36.199-188.8.131.52.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-devel-184.108.40.206-220.127.116.11.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-demo-18.104.22.168-22.214.171.124.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-debuginfo-126.96.36.199-188.8.131.52.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-accessibility-184.108.40.206-220.127.116.11.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-18.104.22.168-22.214.171.124.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-126.96.36.199-188.8.131.52.fc20.src.rpm
DNF does not attempt to remove the packages.
Fixed upstream by e5bb249.
Thank you, that was really quick. I'll test it out soon.
Sorry if it isn't the correct place to ask, but is the github repo the official source? I notice it doesn't have a 0.4.14 tags, or any other version tags at all for that matter. How should I go about compiling an RPM to test the fix?
dnf-0.4.14-1.fc20 has been submitted as an update for Fedora 20.
(In reply to Daniel Miranda from comment #4)
> Sorry if it isn't the correct place to ask, but is the github repo the
> official source? I notice it doesn't have a 0.4.14 tags, or any other
> version tags at all for that matter. How should I go about compiling an RPM
> to test the fix?
Hi Daniel, the easiest thing is probably to use our nightly builds:
Note that these are generally unstable so YMMV, so the best place to release test that a fix works is to use the Fedora updates-testing repo and give karma if it does.
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.14-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
dnf-0.4.14-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.