Re: Reducing installed package size
On Tue, May 02, 2006 at 04:03:38PM +0000, Reinhard Tartler wrote:
> Philippe De Swert wrote:
> > Recently playing with the localepurge package the following came up:
> > Would it be a good idea to create similar packages that purge documentation,
> > man pages, changelogs etc...?
> > This would basically mean we have a simple system to remove all of this after
> > install which gives us greater flexibility and removes the need to adapt the
> > Debian build system. Also it allows for re-use in normal Debian or maybe
> > Slind. It will definitely make it handier for people to have and maintain
> > small Debian installations. Not having to remove all the unnecessary bloat by
> > hand each time after an upgrade.
> Just a opinion: Would it be possible to prevent dpkg writing these files
> to the system at all? Think of flash devices, where write cycles are
Possibly by patching dpkg, but other than that I don't know of any
way to do it.
> > The proposal consists of two packages:
> > * doc purge : removes stuff from /usr/share/doc
> > * man purge : removes stuff /usr/share/man (localepurge already removes
> > localized ones, but it might be interesting to remove everything)
> > Any comments or ideas on this?
Don't forget /usr/share/info. I think we also need support overrides;
first of all let a package specificy that "really, I want my
/usr/share/doc/examples left on the device", second of all
a way for the system administrator to say "I don't care, screw you,
I want to get rid of that anyway..."
So basically something like:
/etc/apt-purge/overrides.d/ <-- for packages to install overrides in
/etc/apt-purge/overrides: <-- for local overrides
> I think this is reasonable, but I think this could break packages in
> subtle ways. Is it mandated by policy that /usr/share/doc and
> /usr/share/man may be deleted by the local admin without breaking
> the 'essential functionality' of the package? (But honestly, I cannot
> give an example for this right now. Perhaps some symlinks to some file
> in /usr/share/doc/$package/examples)
Quoting section "12.3. Additional documentation":
" Packages must not require the existence of any files in
`/usr/share/doc/' in order to function ."
 The system administrator should be able to delete files in
`/usr/share/doc/' without causing any programs to break."
The policy does not explicity mention whether the system administrator
can delete files in /usr/share/man/, /usr/share/locale,
or /usr/share/info, but at least /usr/share/locale seems to be OK to
delete things from, considering the existance of apt-localepurge...
/) David Weinehall <firstname.lastname@example.org> /) Rime on my window (\
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Diamond-white roses of fire //
\) http://www.acc.umu.se/~tao/ (/ Beautiful hoar-frost (/