Bug 1064148 - DNF attempts to remove packages from local file-based repository
Summary: DNF attempts to remove packages from local file-based repository
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-12 06:04 UTC by Daniel Miranda
Modified: 2014-09-30 23:42 UTC (History)
5 users (show)

Fixed In Version: dnf-0.4.14-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-17 21:03:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Miranda 2014-02-12 06:04:35 UTC
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 08:34:45 UTC
Looking.

Comment 2 Ales Kozumplik 2014-02-12 09:24:24 UTC
Fixed upstream by e5bb249.

Comment 3 Daniel Miranda 2014-02-12 17:50:56 UTC
Thank you, that was really quick. I'll test it out soon.

Comment 4 Daniel Miranda 2014-02-12 18:24:37 UTC
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 08:26:14 UTC
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 09:43:11 UTC
(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 07:57:16 UTC
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 21:03:20 UTC
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.