Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 273633

Summary: Controllable compression and docompress (EAPI 4)
Product: Portage Development Reporter: Sebastian Luther (few) <SebastianLuther>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: jcallen, ulm
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 273620    
Attachments: implement-docompress.patch

Description Sebastian Luther (few) 2009-06-10 20:22:24 UTC
This bug tracks the implementation of the EAPI 3 feature mentioned in the summary.
Comment 1 Jonathan Callen (RETIRED) gentoo-dev 2009-10-17 21:51:33 UTC
From PMS:

Commands affecting install compression

In EAPIs listed in table 12.9 as supporting controllable compression, the package manager may optionally compress a subset of the files under the D directory. To control which directories may or may not be compressed, the package manager shall maintain two lists:

* An inclusion list, which initially contains /usr/share/doc, /usr/share/info and /usr/share/man.
* An exclusion list, which initially contains /usr/share/doc/${PF}/html.

The optional compression shall be carried out after src_install has completed, and before the execution of any subsequent phase function. For each item in the inclusion list, pretend it has the value of the D variable prepended, then:

* If it is a directory, act as if every file or directory immediately under this directory were in the inclusion list.
* If the item is a file, it may be compressed unless it has been excluded as described below.
* If the item does not exist, it is ignored.

Whether an item is to be excluded is determined as follows: For each item in the exclusion list, pretend it has the value of the D variable prepended, then:

* If it is a directory, act as if every file or directory immediately under this directory were in the exclusion list.
* If the item is a file, it shall not be compressed.
* If the item does not exist, it is ignored.

The package manager shall take appropriate steps to ensure that its compression mechanisms behave sensibly even if an item is listed in the inclusion list multiple times, if an item is a symlink, or if a file is already compressed.

The following commands may be used in src_install to alter these lists. It is an error to call any of these functions from any other phase.

docompress
    If the first argument is -x, add each of its subsequent arguments to the exclusion list. Otherwise, add each argument to the inclusion list. Only available in EAPIs listed in table 12.9 as supporting docompress.
Comment 2 Ulrich Müller gentoo-dev 2009-12-10 15:40:23 UTC
This corrsponds to PMS/EAPI bug 260118.
Comment 3 Ulrich Müller gentoo-dev 2010-08-28 10:20:01 UTC
Created attachment 245065 [details, diff]
implement-docompress.patch

Here is a first version. I've done some basic testing and didn't notice any problems. The points brought up in bug 260118 have been addressed.

Please review.
Comment 4 Zac Medico gentoo-dev 2010-08-28 23:16:15 UTC
(In reply to comment #3)
> Created an attachment (id=245065) [details]
> implement-docompress.patch

Thanks, that's in git now:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=59ea804b01cd711d4235e46e4cc4fdef8390d5fe