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

Re: Re: Should example scripts be compressed?



On Wed, Mar 16, 2011 at 8:27 AM, Nicholas Bamber <nicholas@periapt.co.uk> wrote:
>> [discussion about possible fixes to debhelper]
> No I do not believe this is required. If overrides are bad thing then
> dh_installexamples needs to fix bad shebangs and broken permissions.

I don't think the dh_compress and dh_installexamples overrides are comparable.

The dh_installexamples override for fixing shebang lines is a special
case -- there is no way that debhelper could know that files installed
to examples/* are Perl files, and there are a wide range of different
(odd) shebang lines people use upstream -- e.g. /opt/perl/... -- and
I've seen many more.

I understand it's really not a "big deal", but keep in mind that it
does require more maintenance of the few packages that are using this
option. I really like the new debhelper 7 short rules format because
it removes much of the boilerplate stuff.

>> Plain text documentation should be installed in the directory
>> /usr/share/doc/package, where package is the name of the package, and
>> compressed with gzip -9 unless it is small.
>
> First of all scripts are arguably not plain text documentation.

I would argue that these *are* plain text documentation. They are
meant to be read, possibly modified by the user, and run. (c.f. the
type of code we have in the Synopsis is part of the documentation. The
examples are just an extension of that)

> Secondly the policy only says "small" so we can take a view on each package
> what is small. That already provides the latitutde to consider the tradeoffs
> between diskspace and end user friendliness.

While Policy does not stipulate this, dh_compress selects the
arbitrary 4kB limit.

I think this line of reasoning breaks down to:

Are users likely to modify examples?

If not, then the examples should not be compressed (so they are easier
to execute as-is).

However, if users want to modify them, they would have to copy them
somewhere else anyway. There is little difference between

cp /usr/share/doc.... .

vs

zcat /usr/share/doc.... >example.pl

In the end, it's a trade-off: is spending a few kB that big of a deal
overall? Probably not. But if that's the case, why do we worry so much
about the size of the Packages file? The line of reasoning for that
issue was that Debian is used on embedded devices with little memory,
and we should use that memory sparingly.

And if users haven't reported the issue yet (e.g. complained about
example scripts being compressed), I am inclined to believe nobody
minds.

Cheers,

Jonathan


Reply to: