Bug 1064148 - DNF attempts to remove packages from local file-based repository
DNF attempts to remove packages from local file-based repository
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-12 01:04 EST by Daniel Miranda
Modified: 2014-09-30 19:42 EDT (History)
5 users (show)

See Also:
Fixed In Version: dnf-0.4.14-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-17 16:03:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Miranda 2014-02-12 01:04:35 EST
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

How reproducible:

Consistently.

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'
[dnf-test-repo]
name=DNF Local Test Repository
baseurl=file:///tmp/dnf-test-repo
enabled=1
gpgcheck=0
EOF
# exit

3. Verify that the repository is being used

$ dnf search example

4. Try to clean DNF data

$ dnf clean all

Actual results:

DNF tries to delete the packages in the local repository.

Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-src-1.7.0.60-2.4.3.0.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-javadoc-1.7.0.60-2.4.3.0.fc20.noarch.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-headless-1.7.0.60-2.4.3.0.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-devel-1.7.0.60-2.4.3.0.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-demo-1.7.0.60-2.4.3.0.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-debuginfo-1.7.0.60-2.4.3.0.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-accessibility-1.7.0.60-2.4.3.0.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.x86_64.rpm
Cannot remove package file /tmp/dnf-test-repo/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc20.src.rpm

Expected results:

DNF does not attempt to remove the packages.
Comment 1 Ales Kozumplik 2014-02-12 03:34:45 EST
Looking.
Comment 2 Ales Kozumplik 2014-02-12 04:24:24 EST
Fixed upstream by e5bb249.
Comment 3 Daniel Miranda 2014-02-12 12:50:56 EST
Thank you, that was really quick. I'll test it out soon.
Comment 4 Daniel Miranda 2014-02-12 13:24:37 EST
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?
Comment 5 Fedora Update System 2014-02-13 03:26:14 EST
dnf-0.4.14-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.14-1.fc20
Comment 6 Ales Kozumplik 2014-02-13 04:43:11 EST
(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:

http://jenkins.cloud.fedoraproject.org/job/DNF/lastSuccessfulBuild/artifact/

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.
Comment 7 Fedora Update System 2014-02-14 02:57:16 EST
Package dnf-0.4.14-1.fc20:
* 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:
https://admin.fedoraproject.org/updates/FEDORA-2014-2471/dnf-0.4.14-1.fc20
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2014-02-17 16:03:20 EST
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.

Note You need to log in before you can comment on or make changes to this bug.