[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Deity UI draft

Lalo Martins wrote:
> Deity UI spec, 3.6 Status Bar:
> >
> >  The required disk space will simply be equal to the package's
> >  Installed-Size header.
> >  The available disk space will be calculated by only taking into
> >  account the partition on which /usr is located. Since most of each
> >  package is installed under /usr, this should provide a rough, yet
> >  fairly accurate estimate even on multi-partition systems.
> Maybe these status fields could be clickable? Clicking on them would make
> Deity actually "df" and "dpkg-dev --contents" to display how much space is
> needed and available on each partition. Then if I see, by the status bar,
> that the package is at space risk, I can click to see if it actually fits.

I thought of doing something like that, but there were too many problems
to overcome.

For instance, look at your specific proposal.  First of all, we are not
guaranteed that deity has access to a package to do a "dpkg --contents"
on it without first downloading it.  The only way around this is to
cache the output of "dpkg --contents" in a Package.gz like file
(which would be quite large).  If we did this, another rather large
file would need to be downloaded (along with the Packages file) before 
deity could start.

Assuming however, for the moment, that we do have access to the package
locally.  Although it's fairly easy to determine the needed space on
each partition for a particular package, what does this tell you?
Surely users aren't only installing one package.  These numbers would
really only be useful if you did this for every package marked for
change on the selection screen.  Seeing the breakdown of how much
of the sendmail package is installed on each of your partitions is
hardly useful if the available space will also be used by the other
x new packages you're adding, the y packages you're upgrading, and
the z packages you're purging at the same time.

As you say, calculating this number will take a long time.  After all,
you have to calculate how much room will be taken or given back for
each of the following cases:

  - new package (install size)
  - upgrade or downgrade (size gained from removed package, and
        install size)
  - purged package (size gained from removed package)

And after all that, how can one calculate how much space is Available
on multiple partitions without calculating the above first?

Bear in mind, that just to keep the 2 numbers in the status bar
up-to-date, you will have to update these numbers each time you
elect to install, keep, or delete a package.  (Granted these
numbers would only have to be updated from calculations on the
current package, so we would not have to do all the above
calculations each time).

Because of the above problems, and the priorities for the first
version of deity, the simpler proposed method was adoppted.

Considering that quite a few people use a single partition, and
that most files installed from packages are installed on /usr,
I think that focusing on /usr isn't unreasonable.

The following numbers were generated today by considering all files
in the bo/binary-i386 hierarchy.  (Arguments can be made that the
packages included in these numbers are not very representative of an
average Debian system, but I think they are still significant).

  - 98.6% of the number of files installed are in /usr
  - 97.5 % of the total installed size of all these packages is in /usr
  - A compressed file (gzip -9) holding the output of "dpkg --contents"
        for every package in bo/binary-i386 is over 900K.
  - It took over an hour and a half of for a 486dx/2-66 to generate the
        above numbers from the 980 packages in bo/binary-i386.

You can see by these numbers that the approximation method proposed,
although not accurate, should be very close.

Thank you for reviewing and commenting on the deity UI spec.


Behan Webster     mailto:behanw@verisim.com
+1-613-224-7547   http://www.verisim.com/

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: