Bug 53583 - Doesn't account for already-downloaded packages when calculating spool space required
Summary: Doesn't account for already-downloaded packages when calculating spool space ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: up2date
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adrian Likins
QA Contact: Jay Turner
URL:
Whiteboard:
: 62708 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-12 10:32 UTC by Bill Crawford
Modified: 2015-01-07 23:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-05-20 12:38:57 UTC
Embargoed:


Attachments (Terms of Use)
patch against up2date-2.7.51-7.x.3 (2.63 KB, patch)
2002-04-05 17:33 UTC, James Manning
no flags Details | Diff
simple hack to do both md5 methods and show the diff - just for testing (975 bytes, patch)
2002-04-05 18:12 UTC, James Manning
no flags Details | Diff
patch against up2date-2.7.65-7.x.3 - works once checkRpmMd5 acts right :) (2.02 KB, patch)
2002-04-05 18:18 UTC, James Manning
no flags Details | Diff
better version - don't do the cached checks (hits fs) unless we need that extra space in the check (2.19 KB, patch)
2002-04-05 22:22 UTC, James Manning
no flags Details | Diff
*sigh* yeah - zero out the sum var before re-calc'ing a sum - dammit (2.21 KB, patch)
2002-04-05 22:30 UTC, James Manning
no flags Details | Diff

Description Bill Crawford 2001-09-12 10:32:35 UTC
Description of Problem:
I tried to update everything available on Monday.  up2date stopped (at 98%
done!) with an error (auth required?) for one package; now I'm trying
again, most of the packages are already downloaded, but no account is being
taken of them, and up2date is complaining about lack of free space.  I
don't really want to download them all again, because it's a waste of time
and bandwidth.

Version-Release number of selected component (if applicable):
up2date-2.7.0-7.x.1

Comment 1 baulv 2001-10-01 01:37:33 UTC
yep, downloaded packages are not removed from list.


Comment 2 Adrian Likins 2001-10-24 21:17:05 UTC

*** This bug has been marked as a duplicate of 5316 ***

Comment 3 Adrian Likins 2001-10-24 21:50:05 UTC
yup, will take a look at fixing this for the next release of up2date.

Comment 4 Bill Crawford 2001-10-24 23:50:56 UTC
Looks like this was marked as a duplicate of the wrong bug?  5316 was an install
problem, I guess a digit is missing (should be 53xxx).


Comment 5 Bill Crawford 2001-10-24 23:53:39 UTC
FWIW up2date worked very well for me today, although it took a while to download
the updates.

Where would I log an enhancement request for the RHN web interface, by the way? 
I need to delete two of the three profiles my work desktop has on the server -
one each for 7.1, some hybrid Roswell / Raw Hide version and now 7.2 :o)


Comment 6 Adrian Likins 2001-10-24 23:59:39 UTC
doh, typo...  meant bug 53216

*** This bug has been marked as a duplicate of 53216 ***

Comment 7 Adrian Likins 2002-04-04 21:16:16 UTC
*** Bug 62708 has been marked as a duplicate of this bug. ***

Comment 8 James Manning 2002-04-05 17:33:56 UTC
Created attachment 52404 [details]
patch against up2date-2.7.51-7.x.3

Comment 9 James Manning 2002-04-05 17:36:11 UTC
 ugh - sorry, wrong patch got uploaded - I'm tracking down a "problem" with 
rpm.checksig now - either there's something quirky about it or we're 
interpreting its result wrong.  The gist of it is that if I force the legacy 
3.0.x behavior (so we spawn rpm -Kv) then the md5 check happens fine - if 
instead it does the rpm.checksig, it says it's invalid.  Since the rpm binary 
says it's fine, something's screwy... 
 
so, ignore this patch while I clarify what the rpm.checksig problem is.

Comment 10 James Manning 2002-04-05 18:11:24 UTC
UGH - if I edit up2date.py's checkRpmMd5 to comment out the if, else, and 
"return ret" lines (so we run both rpm.checksig *and* rpm -Kv for the file) 
then add some prints to spit it out: 
 
Getting headers for available packages... 
rpm.checksig returns 1 on file /var/spool/up2date/zip-2.3-12.i386.rpm 
rpm -Kv returns 0 on file /var/spool/up2date/zip-2.3-12.i386.rpm 
 
any ideas why checksig says it's wrong with -Kv is fine with it? 
existing known bug?

Comment 11 James Manning 2002-04-05 18:12:52 UTC
Created attachment 52424 [details]
simple hack to do both md5 methods and show the diff - just for testing

Comment 12 James Manning 2002-04-05 18:18:43 UTC
Created attachment 52425 [details]
patch against up2date-2.7.65-7.x.3 - works once checkRpmMd5 acts right :)

Comment 13 Adrian Likins 2002-04-05 21:05:19 UTC
patch looks good. thanks.

not sure I follow the issue with rpmcheckMd5...?

I'll test it out and see whats up

Comment 14 Adrian Likins 2002-04-05 21:23:06 UTC
I'll see if I can get the gui code handling this case as well,
and hopefully in the next version

Comment 15 James Manning 2002-04-05 22:22:27 UTC
Created attachment 52484 [details]
better version - don't do the cached checks (hits fs) unless we need that extra space in the check

Comment 16 James Manning 2002-04-05 22:26:00 UTC
better version of patch avail, please apply that instead - it'll behave nicer  
in the typical case and just hit if(cached) if we need that extra space in the  
check  
  
The checkRpmMd5 problems with rpm.checksig are covered pretty well in bug  
62802 which I think Jeff is ignoring because he doesn't like me :)  If anyone  
else knows rpm.checksig expected behavior, I'm all for it :)

Comment 17 James Manning 2002-04-05 22:30:19 UTC
Created attachment 52485 [details]
*sigh* yeah - zero out the sum var before re-calc'ing a sum - dammit

Comment 18 Adrian Likins 2002-04-05 22:34:58 UTC
I kind of like the first one better (minus s/filename/fileName). Since
with the first one, the totalSize value is always going to be accurate,
not just in cases where it matters. 

Since I display that value in the gui, I would like it to be accurate,
and if I can get there the same way in the cli, all the better.

I'm not too worried about the performance hit of doing the md5 check.

Comment 19 James Manning 2002-04-05 22:38:56 UTC
ah, ok - forgot the gui would display that.  Neat :) 
 
The one thing I don't like is that we're not caching (although arguably that's 
better) the md5 check so we do it twice with this patch - once at size check 
and another at getPackage time.  But, if the md5 I/O traffic's not a big deal 
(should still be largely cached from the first time through) we're probably 
still ok.

Comment 20 Adrian Likins 2002-04-08 23:56:45 UTC
looks like doing the md5 for every package in the gui is too
slow....

Probabaly going to try something like the patch you suggest...

unless I can find a way to keep a accurate total and not
be slow as dirt... 

perhaps checking to see if the file sizes match, instead
of doing the md5 (since I do that later anyway...)

Comment 21 Adrian Likins 2002-04-09 03:13:37 UTC
yup, doing a size check seems to work. I do the md5check later when
I do the package fetch path (I changed it back to not use isPackageCached,
since it no longer validates md5s)

gui/cli/action seems to like the changes. Should be fixed
in version 2.7.88 or higher

Comment 22 Matt Jamison 2003-05-20 12:38:57 UTC
works, I'm closing bug.


Note You need to log in before you can comment on or make changes to this bug.