Bug 426630 - yum gives incorrect download size due to not taking the cache into account.
yum gives incorrect download size due to not taking the cache into account.
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-23 05:27 EST by lexual
Modified: 2014-01-21 18:01 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-01 22:30:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description lexual 2007-12-23 05:27:51 EST
When yum shows the download size for an install, it only gives the total size 
of all the rpms.
It should take into account files that are already in the 
cache: /var/cache/yum .

Here's an example of how apt-get handles the similar situation (not exactly, 
just from memory).

A) All the packages are on local disk:
Download size: 0Mb/212Mb.

B) Some of the packages are on disk:
Download size: 55Mb/212Mb.
Comment 1 Seth Vidal 2008-01-01 22:30:11 EST
Without checking the already downloaded packages before the confirmation there's
no way to know that the cached packages are valid/usable. So the download size
is really a worst-case size for the download. Since the checking is non-trivial
in terms of time I don't really see the benefit in wasting the user's time just
to tell them that their download will be smaller.

Comment 2 Seth Vidal 2008-01-01 22:30:26 EST
Without checking the already downloaded packages before the confirmation there's
no way to know that the cached packages are valid/usable. So the download size
is really a worst-case size for the download. Since the checking is non-trivial
in terms of time I don't really see the benefit in wasting the user's time just
to tell them that their download will be smaller.

Comment 3 lexual 2008-01-02 04:39:53 EST
I'm a lot less familiar with yum's internal workings.
Couldn't we mirror apt's behaviour.
Files are downloading into /var/cache/apt/archives/partial and on complete moved
to /var/cache/apt/archives .
If the file isn't in /var/cache/apt/archives, it doesn't exist for the purposes
of calculating download size.


I must respectfully disagree with the decision to close this bug.
Hopefully the case I have made below, along with use case scenarios can sway
your opinion.
Remember, changing your mind about something is something all intelligent people
do: http://www.edge.org/q2008/q08_index.html

I think Fedora must take into account users with slow and or expensive net
connections. Such users should be given correct and detailed information before
a download occurs. My mother is on a plan that only includes a few 100 meg
before she has to pay excess charges per meg. The system shouldn't download
large chunk of data without asking her first. The system should give correct
info when asking if she would like to download something.

Let's say I am on a slow or expensive net connection, and a large update or
install via yum is cancelled or crashes before the dowload phase has completed.
Maybe the user only has 3Mb left to go from a couple of 100Mb download. When the
user tries to run the update/install command again, they are incorrectly told
that they will need to download the whole lot again. User swears at the computer
and the Fedora developers, and gives up frustrated.
If he had correct info, he would know he only has a tiny download amount remaining.

Many users have very slow net connections.
If I see that an update is telling it will need to download 200Mb and I am a
dialup user, I might think twice about, even though I may only have to download
5Mb or 0Mb.

Many users have expensive internet plans with excess data usage.
If I have to pay $0.15/Mb for excess downloads [not unusual where I live], and I
see that to install package foo, I will need to download 100Mb, I will probably
not bother because it will cost me $15. Even though it may  already be in my cache.

Keep up the good work,

Lex.
Comment 4 James Antill 2008-01-22 14:00:47 EST
 verifyLocalPkg() turns out to be pretty fast (150+MB in a second or so), so I
added this upstream.
Comment 5 lexual 2008-01-23 03:57:13 EST
I'm confused about this bug's resolution.
Where is the upstream bug?
Comment 6 Tim Lauridsen 2008-01-23 14:53:06 EST
Upstream means that the issue is fixed in upstream yum

http://devel.linux.duke.edu/gitweb/?p=yum.git;a=commitdiff;h=37ccb3fdbe5368c14d972e0979823f139ea79aa8
Comment 7 lexual 2008-01-23 15:16:15 EST
Thanks. Last question: does this mean fedora 9 or 10?

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