Bug 428788

Summary: --downloadonly does not work with file:// repository
Product: Red Hat Enterprise Linux 5 Reporter: Jan Hutař <jhutar>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-15 13:37:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Hutař 2008-01-15 08:45:09 UTC
Description of problem:
--downloadonly option (provided by yum-downloadonly plugin) does not work with 
file:// repository. With the same repository setup yumdownloader (from yum-
utils) works.


Version-Release number of selected component (if applicable):
yum-3.0.1-5.el5.noarch
yum-downloadonly-1.0.4-3.el5.noarch


How reproducible:
always


Steps to Reproduce:
1. yum -y install --downloadonly --downloaddir=`pwd` test
2. ls test*.rpm


Actual results:
Package is not downloaded (it is downloaded with `yumdownloader test`)


Expected results:
Package is downloaded


Additional info:
# cat /etc/yum.repos.d/repo022.repo 
[repo022]
name=repo022 test repository
baseurl=file:///mnt/tests/CoreOS/yum/plugins-generic/repo-0.2-2
enabled=1
gpgcheck=0
# ls /mnt/tests/CoreOS/yum/plugins-generic/repo-0.2-2
comps.xml  repodata  test-0.2-2.i386.rpm  test-skip-broken-0.2-2.i386.rpm

Maybe this is a feature, not a bug, please let me know. I would just expect 
this to work.

Comment 1 Jan Hutař 2008-01-15 08:46:52 UTC
# yum -y install --downloadonly test
Loading "downloadonly" plugin
Loading "rhnplugin" plugin
Setting up Install Process
Setting up repositories
rhel-i386-server-cluster- 100% |=========================| 1.4 kB    00:00     
rhel-i386-server-5        100% |=========================| 1.4 kB    00:00     
rhel-i386-server-vt-5     100% |=========================| 1.4 kB    00:00     
rhel-i386-server-cluster- 100% |=========================| 1.4 kB    00:00     
rhel-i386-server-suppleme 100% |=========================| 1.2 kB    00:00     
rhn-tools-rhel-i386-serve 100% |=========================| 1.2 kB    00:00     
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package test.i386 0:0.2-2 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 test                    i386       0.2-2            repo022           2.3 k

Transaction Summary
=============================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 2.3 k
Downloading Packages:


exiting because --downloadonly specified 

Comment 2 James Antill 2008-01-15 13:37:21 UTC
 This is a feature, yum --downloadonly just makes sure that the packages are
downloaded from the network ... so you can run with -C. file:// repos. don't
have that problem.
 To put it another way, yum doesn't copy file:// urls into it's cache dir.
because only bad things could happen if it did (like run out of disk space, and
take more time).