Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1186948
Summary: | [download] data loss: dnf download should not delete files from local repositories | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Igor Gnatenko <ignatenko> |
Component: | dnf-plugins-core | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | akozumpl, ignatenko, jsilhan, mluscon, mmraka, packaging-team-maint, pnemade, rholy, rjones, tla |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | dnf-plugins-core-0.1.7-1.fc22 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-05-08 07:27:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 910269, 1156498 |
Description
Igor Gnatenko
2015-01-28 23:13:33 UTC
Hi Igor, what was your $PWD? Does it work with root access? (In reply to Jan Silhan from comment #1) > Hi Igor, what was your $PWD? Does it work with root access? $PWD = ~/ yes, it works with root access, because it's copying rpm file from local repo (only-root-rw) and removing rpm from local repo. it's need to be fixed in code while we checking from what repo we are downloading package and repo url =~ file://.* - don't do os.unlink() Igor, if you already know how to fix this, make a PR, please. Otherwise I am giving it a low prio. This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 I was just filing a bug about this, but discovered this one. *NB* all the following commands are executed as non-root. Create a local repository: mkdir /tmp/repo cd /tmp/repo dnf download bash createrepo . ls -l Observe that the local repo contains a bash-*.rpm file and the repodata/ subdirectory. Create a yum.conf pointing to the local repository: mkdir /tmp/download cd /tmp/download cat > yum.conf <<'EOF' [main] cachedir=/var/cache/yum debuglevel=1 logfile=/var/log/yum.log retries=20 obsoletes=1 gpgcheck=0 assumeyes=1 reposdir=/dev/null [local] name=local baseurl=file:///tmp/repo failovermethod=priority enabled=1 gpgcheck=0 EOF Now download files using the local repository: cd /tmp/download dnf download -v -c yum.conf bash The 'dnf download' command works -- that is not the issue. However go and look back in the /tmp/repo directory. The dnf command has deleted the original RPM in the local repository! Version-Release number of selected component (if applicable): dnf-0.6.5-1.fc23.noarch (In reply to Jan Silhan from comment #3) > Igor, if you already know how to fix this, make a PR, please. Otherwise I am > giving it a low prio. What is a PR? IMO this is a very serious bug. dnf download should not touch original repositories. Moreover, I think that the plugin should not *move* the files, it should be enough to *copy* them since dnf.Base takes care of removing the packages downloaded using "download_packages" and it already tests whether they were really downloaded or whether they are available in a local repository. I applied your test patch to dnf-plugins-core, and I can confirm that it fixes the case outlined in comment 5. dnf-plugins-core-0.1.7-1.fc22,hawkey-0.5.5-1.fc22,dnf-1.0.0-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.7-1.fc22,hawkey-0.5.5-1.fc22,dnf-1.0.0-1.fc22 Package dnf-plugins-core-0.1.7-1.fc22, hawkey-0.5.5-1.fc22, dnf-1.0.0-1.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.1.7-1.fc22 hawkey-0.5.5-1.fc22 dnf-1.0.0-1.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-7483/dnf-plugins-core-0.1.7-1.fc22,hawkey-0.5.5-1.fc22,dnf-1.0.0-1.fc22 then log in and leave karma (feedback). dnf-plugins-core-0.1.7-1.fc22, hawkey-0.5.5-1.fc22, dnf-1.0.0-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. Can confirm this is fixed in dnf-plugins-core-0.1.8-1.fc23.noarch |