Bug 753843

Summary: yum-plugin-downloadonly broken
Product: Red Hat Enterprise Linux 6 Reporter: Nick Bartle <nick.bartle>
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED WORKSFORME QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: ksrot, pknirsch, zpavlas
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: 2013-05-23 07:12:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Nick Bartle 2011-11-14 16:36:58 UTC
Description of problem:
run yum with following options --downloadonly --downloaddir/foo/bar install wibble.rpm - yum will then proceed as normal - and exit because downloadonly specified - except the rpm won't actually exist anywhere!

Version-Release number of selected component (if applicable):
yum-plugin-downloadonly-1.1.30-6

How reproducible:
every time

Steps to Reproduce:
1. run "yum install some_rpm.rpm --downloadonly --downloaddir=/some/dir"
2.check "/some/dir" from above and note that rpm is NOT present
3. check "/var/cache/yum" and note that RPM is also NOT present here
  
Actual results:
Missing rpm

Expected results:
a downloaded rpm

Additional info:
This behaviour did not occur on RH 5.5.

Comment 2 Nick Bartle 2011-11-14 17:44:05 UTC
Note in my description I have accidentally omitted '=' - in my steps to reproduce the command and options are correct as typed.

Comment 3 Karel Srot 2011-12-12 11:12:26 UTC
Switching to yum-utils component.

I believe the rpm is not in cache because of keepcache=0 in /etc/yum.conf.

Btw, it is working for me in RHEL6.2

[root@dhcp-30-102 ~]# rpm -q yum yum-plugin-downloadonly
yum-3.2.29-22.el6.noarch
yum-plugin-downloadonly-1.1.30-10.el6.noarch
[root@dhcp-30-102 ~]# yum install zsh --downloadonly --downloaddir=/tmp
Loaded plugins: downloadonly, product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating certificate-based repositories.
This system is not registered with RHN.
RHN Satellite or RHN Classic support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package zsh.x86_64 0:4.3.10-4.1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package              Arch                    Version                           Repository               Size
==============================================================================================================
Installing:
 zsh                  x86_64                  4.3.10-4.1.el6                    rhel62                  2.1 M

Transaction Summary
==============================================================================================================
Install       1 Package(s)

Total download size: 2.1 M
Installed size: 4.8 M
Is this ok [y/N]: Y
Downloading Packages:
zsh-4.3.10-4.1.el6.x86_64.rpm                                                          | 2.1 MB     00:06     


exiting because --downloadonly specified 
[root@dhcp-30-102 ~]# ls /tmp/zsh-4.3.10-4.1.el6.x86_64.rpm 
/tmp/zsh-4.3.10-4.1.el6.x86_64.rpm

And it is working also with yum-plugin-downloadonly-1.1.30-6.el6.noarch

Comment 4 RHEL Program Management 2012-05-03 05:31:43 UTC
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 5 Karel Srot 2013-03-05 08:59:39 UTC
FIY, yum-plugin-downloadonly is now obsoleted by yum itself, see e.g. bug 905438, bug 876961, bug 912712.

Comment 6 James Antill 2013-04-09 21:16:26 UTC
> I believe the rpm is not in cache because of keepcache=0 in /etc/yum.conf.

That controls what happens after the install, so it should be fine.

There have been problems with downloadonly changing the download dir. and rhnplugin, but I believe then the rpm just ends up where it normally would (in /var/cache/yum) and that might no longer be true.

I'm not sure what could happen to have the file not appear anywhere ... what does strace show?

Comment 7 Karel Srot 2013-04-10 06:16:37 UTC
(In reply to comment #6)
> I'm not sure what could happen to have the file not appear anywhere ... what
> does strace show?

I am afraid that it is too late now to ask the reporter.

Anyway, it works fine for me:


# yum -y install --downloadonly --downloaddir=/tmp aide
Loaded plugins: auto-update-debuginfo, downloadonly, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package aide.x86_64 0:0.14-3.el6_2.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================
 Package             Arch                  Version                         Repository                    Size
==============================================================================================================
Installing:
 aide                x86_64                0.14-3.el6_2.2                  rhel63-server                123 k

Transaction Summary
==============================================================================================================
Install       1 Package(s)

Total download size: 123 k
Installed size: 297 k
Downloading Packages:
aide-0.14-3.el6_2.2.x86_64.rpm                                                         | 123 kB     00:00     


exiting because --downloadonly specified 
# ls /tmp/aide-0.14-3.el6_2.2.x86_64.rpm 
/tmp/aide-0.14-3.el6_2.2.x86_64.rpm

# rpm -q yum yum-plugin-downloadonly
yum-3.2.29-40.el6.noarch
yum-plugin-downloadonly-1.1.30-14.el6.noarch

I would propose to close it as fixed_current_release or works_for_me.

Comment 8 Zdeněk Pavlas 2013-05-23 07:12:57 UTC
Closing, as we are not able to reproduce the bug.