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

Re: PDF files and dh_compress



On Mon, 08 May 2006, Craig Small wrote:
> > Obviousely dh_compress doesn't bother checking if there is a good reason
> > to compress the file (like some threshold gain, after which file has to
> > be compressed). I doubt that it is worth implementing, but I think it
> > should at least take care about not compressing pdf's in -doc packages.
> > What do you think?
> Fix the policy not the tool.
> If there is a good reason not to compress pdf files, then it should be
> put into the policy as an exception.  Currently if dh_compress did not
> compress pdf files, it breaks 12.3 of policy.
Well... the policy states in 12.3 Additional documentation:

 *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.

Of cause we can call PDFs as "text documentation", but often with the
same success as png's with text in them. I bet policy intended to
address regular textual (ASCII) files with documentation.

Probably due to that "text documentation" limitation, dh_compress
doesn't compress many other things already:

 find usr/share/doc -type f \\( -size +4k -or -name "changelog*" -or -name "NEWS*" \\) \
\
\\( -name changelog.html -or ! -iname "*.htm*" \\) \\
! -iname "*.gif" ! -iname "*.png" ! -iname "*.jpg" \\
! -iname "*.jpeg" ! -iname "*.gz" ! -iname "*.taz" \\
! -iname "*.tgz" ! -iname "*.z" ! -iname "*.bz2" \\
! -iname "*-gz"  ! -iname "*-z" ! -iname "*_z" \\
! -iname "*.jar" ! -iname "*.zip" ! -iname "*.css" \\

Ironically .zip is among them (I believe PDF internally uses zip
compression, doesn't it?)

> > is worth to provide linda/lintian warnings about twice compressed
> > files or at least compressed pdfs in -doc packages.
> Once policy is changed, yes. But not before.
So as to me, there is no real need in fixing the policy, but rather this
question has to be addressed in dev ref, or in packaging practices. ?

-- 
                                  .-.
=------------------------------   /v\  ----------------------------=
Keep in touch                    // \\     (yoh@|www.)onerussian.com
Yaroslav Halchenko              /(   )\               ICQ#: 60653192
                   Linux User    ^^-^^    [175555]


Attachment: pgpNySy1hWsId.pgp
Description: PGP signature


Reply to: