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

Re: Removing unwanted files at installation time

I like the idea of making things smaller, but at what cost?

On Sun, Jan 23, 2000 at 11:25:53AM -0600, MiniVend wrote:
> Is there some way to set up an installation so that it can be totally
> customized for a specefic user's needs. I want to have the following to
> be done when installing any system, upgrade,  or application.
> 1. Be able to select which processor that system uses, i386, m68, alpha,
> etc from a menu. such that when the selection is made all installed
> software does NOT include references to processors that are not
> necessary. This would eliminate about half of the Kernel stuff that I do
> not need for starters.

I am not sure this is possible in quite the form you wish it to take:
packages that have references to other processors in their documentation
would require several different versions of their documentation, one for
each processor. As for the kernel, my quick glance through looked like you
could save 15.2 megs by removing the non-i386 entries in the arch and
include directories. I could write a quick little script to be applied after
downloading the new kernel source to delete all those in a real hurry.

> 2. Be able to select which language a system uses; so that all
> references to other languages are NOT installed from any software
> packages. i.e. I do not need docs in Polish, Chinese,  French, or
> Japanese-- so these are NOT installed.

If I am not mistaken, if you don't install locales, you don't get the extra
languages, but .. I could be very wrong. However, I don't think that
translations lead to huge packages -- my /usr/share/locale directory
contains some 14.6 megs.

> 3. Be able to convert all of the files that are related to copyright,
> GPL, changes, and possibly others that are mostly duplicated in each
> applcation, to symlinks to cover dependencies, and set them up as a
> single document, that gives credit where it should but eliminates the
> MANY duplicated text files in a typical installation.

This I admit would be sort of slick -- perhaps there should be a
"copyrights" directory off of /usr/share/doc/ that contains the entries
"GNU" "Artistic" "BSD" "XFree86" "Mozilla" and packages could symlink their
copyright to one of those entries, if it matches exactly. On my computer,
the largest copyright doc I have is 16539 bytes. I have 409 of them under
/usr/share/doc/*/copyright, so if we are fairly pessimistic, that is upwards
to 6.7 megs. (There seem to be more many more small ones than large ones,
so I think this is a very gross overestimate, but YMMV.)

Of course, some packages just don't fall directly under one of those main
ones, so some will still get their own copyright file.

So, we are looking at saving upwards of 6 megs or so for this idea -- but
symlinks still take 512bytes at minimum, right? So it isn't quite that cut
and dry..

> Will these ever be a feature of debconf or some such application? I am
> not wanting to create a new distribution, only streamline my
> installation. My last upgrade gave me a disk full warning and it is on a
> 3.2 Gb drive. Granted it is an extensive setup, I still think a lot of
> disk space is  being non-productively used, due to unnecessary files.
> Thanks to you developers, for all of the efforts! Potato Rocks!!

These several ideas have saved roughly 35.8 megs, or about 1% of your hard
drive space.

I am not sure we need to put precious programmer time into these little
optimizations, when a ~15 line shell script could save .5% of your hard
drive space, and not installing the locales package could save another .5%.
The other bit possible to be saved with copyrights takes quite a bit more
work, and would seem non-trivial to me -- we would probably have a large
discussion about the viability of it, two or three proposals would be put
forth describing the transition period, and after a bit, we might have a
consensus on which way would be best. All that time, to save a few

If you wanted the symlink route, perhaps the thing to do would be to package
the various copyright documents into a package (copyrights? :) each with
their own name (gpl.v1 gpl.v2 artistic bsd etc...) and offer to package
maintainers they could change their packages to use symlinks -- assuming
policy doesn't require the actual copyright document instead of symlinks. (I
think avoiding hardlinks would be a good idea -- that way, vrms could
quickly check the ratios of gpl versus artistic, etc -- who knows if it is
useful, but it would be fun all the same. :) 

In conclusion, I am not sure it is worth all that programmer time to gain
perhaps 35 megs of disk space, especially when other programmers put quite a
bit more time into making our machines language-flexible and processor
flexible. You can save that 35 megs a lot faster by not installing emacs, or
X, or tetex or something else similarly large.

Of course, don't let me stop you from putting together the various programs
to do this; saving hard drive space is a worthy goal, and if you feel
strongly enough about it, please do -- I just don't see the benefits for
debian as a whole. (It is probably more cost effective to just buy a new
larger hard drive -- they are going about $10/gig for EIDE these days, so
for every hour you put into the problem, figure that is an additional gig to
your hard drive, if you value your time as little as I do. :)

(Maybe it would be a good idea to help poke holes into my own arguments.
First, all these sizes came from *my* installed computer; yours will likely
differ. Depending on how much they differ, it might become more important to
you, the reader, or less important, to implement these ideas. Also, I am a
lazy person, so rather than try to deal with the symlinks in /usr/doc and
/usr/share/doc, I just chose the one I thought was larger. Someone better
and less lazy would likely want to take steps to include the both of them
instead of just one. Also, I used kernel 2.2.13's sources as found on
ftp.us.kernel.org. Other kernels will likely vary.)

And, of course, all this is IMHO. :)

Seth Arnold | http://www.willamette.edu/~sarnold/
Hate spam? See http://maps.vix.com/rbl/ for help
Hi! I'm a .signature virus! Copy me into
your ~/.signature to help me spread!

Reply to: