Bug 97905

Summary: up2date -k option or packagedir doesn't work
Product: Red Hat Enterprise Linux 2.1 Reporter: Narsi Subramanian <narsis>
Component: up2dateAssignee: Bret McMillan <bretm>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: cberg, cperry, jamisonm, rhn-bugs, smartin, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.4.8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-26 22:19:07 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:
Bug Depends On:    
Bug Blocks: 130798    

Description Narsi Subramanian 2003-06-23 20:48:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
- Downloaded some packages for testing.
- Moved headers and rpm packages to /tmp from /var/spool/up2date.
- Executed
  up2date -K /tmp <package name>
- It downloads and installs without looking at the /tmp directory.
- Repeated with packagedir option and it has identical results.

The advantage is to patch multiple systems while only downloading the patches
once.  

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.As above
2.
3.
    

Additional info:

Comment 1 Adrian Likins 2003-06-23 22:10:28 UTC
Seems to work for me.

one thing to keep in mind is that the app will
put up a progress bar for "downloading" but will
zip it 100% instantly...
  
the -k stuff works my making a symlink in
/var/spool/up2date/*.rpm to the actual
file on disk. if there are symlinks
for the package in /var/spool/up2date,
then it is working.
  


Comment 2 Josef Komenda 2003-06-24 14:26:54 UTC
Confirmed - the man page should mention that it's creating a symlink.

Comment 3 Chuck Berg 2003-06-25 18:02:33 UTC
Even if the files exist in /var/spool/up2date, it downloads them every time. If
I use the -k option, it makes the link as expected, and then overwrites the file
via the link.

If it wasn't trying to overwrite the files, it would work with the -k directory
read-only, but in that case I get this:
Retrieving selected packages...
/var/spool/up2date/LPRng-3.  LPRng-3.7.4-28.2.i386.rpm:   There was some sort of
 I/O error: [Errno 30] Read-only file system: '/var/spool/up2date/LPRng-3.7.4-28
.2.i386.rpm'

When it has write access, it overwrites the files via the symlink:
From strace up2date -u -d --nox -k /mnt/redhat-ES2.1-updates:

stat64("/var/spool/up2date/kdebase-2.2.2-9.i386.rpm", {st_mode=S_IFREG|0644,
st_size=18059744, ...}) = 0
stat64("/mnt/redhat-ES2.1-updates/kdebase-2.2.2-9.i386.rpm",
{st_mode=S_IFREG|0666, st_size=18059744, ...}) = 0
unlink("/var/spool/up2date/kdebase-2.2.2-9.i386.rpm") = 0
write(1, "/var/spool/up2date/kdebase- ", 28) = 28
symlink("/mnt/redhat-ES2.1-updates/kdebase-2.2.2-9.i386.rpm",
"/var/spool/up2date/kdebase-2.2.2-9.i386.rpm") = 0
access("/var/spool/up2date/kdebase-2.2.2-9.i386.rpm", R_OK) = 0
[...]
write(1, " ", 1)                        = 1
write(1, "kdebase-2.2.2-9.i386.rpm:   ", 28) = 28
open("/var/spool/up2date/kdebase-2.2.2-9.i386.rpm", O_RDWR|O_CREAT|O_TRUNC,
0666) = 5



Comment 4 Chuck Berg 2004-02-18 16:55:47 UTC
The up2date that comes with RHEL3 does not have this bug, so I guess
it can be closed.

Comment 6 Adrian Likins 2005-01-14 21:20:16 UTC
ah, finally fixed in 4.4.8. The multirepo stuff
broke it in a more subtle way that I thought. The
links were getting created, but the files get
downloaded anyway. 

Should be fixed now.