FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 02-19-2009, 10:06 AM
Ulrich Mueller
 
Default Proposal for compression handling (was: prepalldocs is now banned)

>>>>> On Wed, 18 Feb 2009, Alexis Ballier wrote:

>> If you really, genuinely think you have a case for compression of
>> docs, backed up with statistics showing that it's a relevant
>> change, then you should write a proposal for future EAPIs for
>> handling it,

> I don't understand why something that has been there for ages has to
> die. For what I've seen, the major (and only) problem with
> prepalldocs is its definition and I'm sure we can find one that
> everybody will agree with.

>> and you should do it in such a way that it works automatically for
>> all ebuilds, without any developer intervention (but providing some
>> way for ebuilds to disable it where necessary).

> This is probably a good start:
> http://archives.gentoo.org/gentoo-dev/msg_eb1f7952eb2f0fe725bde331a4d9ae30.xml

Let's fill this with some life. What do you think about the following
proposal:

Package managers supporting compression would internally maintain two
lists of paths, both having a default value, plus the possibility to
modify them from ebuilds/eclasses:

- an inclusion list, initially containing:
/usr/share/doc /usr/share/info /usr/share/man
- an exclusion list, initially containing:
/usr/share/doc/${PF}/html

Then we need a new command, let's call it "docompress" for now (name
to be discussed), to manipulate the lists:

- "docompress" (without option or with option "-a"): add paths
(directories or files) to the inclusion list
- "docompress -d": delete paths from the inclusion list
- "docompress -x": add paths to the exclusion list
- "docompress -x -d": remove paths from the exclusion list
(maybe this is not needed?)

(For package managers not supporting compression, "docompress" would
be a no-op.)

Between the src_install and pkg_postinst phases, the package manager
would then go through the inclusion list and optionally (depending on
the user's setting, i.e. PORTAGE_COMPRESS in the Portage case)
compress anything found there, excluding the stuff from the exclusion
list.

The two most common usage cases:

1. dodoc <file1> <file2> ...

and

2. emake ... docdir="/usr/share/doc/${PF}" install

would just work as expected, without any need for calling docompress.

A package that needs uncompressed documentation would simply call
"docompress -d /usr/share/doc" or
"docompress -x /usr/share/doc/${PF}/<some subdir>".

In addition, I think that Tiziano's suggestion to have "dodoc" operate
on directories (or to add a "-r" option as "doins" has) is also a good
idea.

Ulrich
 
Old 02-19-2009, 08:25 PM
Ciaran McCreesh
 
Default Proposal for compression handling (was: prepalldocs is now banned)

On Thu, 19 Feb 2009 12:06:17 +0100
Ulrich Mueller <ulm@gentoo.org> wrote:
> Package managers supporting compression would internally maintain two
> lists of paths, both having a default value, plus the possibility to
> modify them from ebuilds/eclasses:
>
> - an inclusion list, initially containing:
> /usr/share/doc /usr/share/info /usr/share/man
> - an exclusion list, initially containing:
> /usr/share/doc/${PF}/html
>
> Then we need a new command, let's call it "docompress" for now (name
> to be discussed), to manipulate the lists:
>
> - "docompress" (without option or with option "-a"): add paths
> (directories or files) to the inclusion list
> - "docompress -d": delete paths from the inclusion list
> - "docompress -x": add paths to the exclusion list
> - "docompress -x -d": remove paths from the exclusion list
> (maybe this is not needed?)

If there's an inclusion list and an exclusion list, there's only a need
to delete things from the exclusion list if the exclusion list has bad
initial values, and never any need to delete things from the inclusion
list. And since reliably rewriting links in HTML when compressing is at
best tricky and at worst impossible (think JavaScript navigationy
things), is there ever going to be any need for removing from the
exclusion list?
--
Ciaran McCreesh
 

Thread Tools




All times are GMT. The time now is 11:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org