https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-14000011.3.3.11 > 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. I'd dare say this is very unclear and completely doesn't indicate what behavior you can rely on. More specifically: 1. listed multiple times -- I think we can clearly presume it means it doesn't get compressed twice. 2. is a symlink: 2a. should the symlink target be compressed if it's not explicitly on inclusion list? 2b. should the symlink be renamed if the target is not compressed? 2c. should the symlink be updated to point to a compressed target if it's explicitly in compression list? 2d. what happens if symlinks points to 'foo' that's not on compression list but 'foo.$COMPEXT' exists? 3. file is already compressed: 3a. does that mean it gets uncompressed and recompressed or skipped? 3b. how does the PM know if file is compressed? what if it's compressed using format that the PM does not recognize? 3c. do we really want to allow that? 4. bonus question: what if 'foo' and 'foo.$COMPEXT' both exist?
Controllable compression is implementation-defined and entirely optional, so you cannot rely on anything there. If you want any specific behaviour (e.g., if the package can only read gzip-compressed files), then have the ebuild itself compress the file and put it on the exclusion list with docompress -x. (In reply to Michał Górny from comment #0) > 1. listed multiple times -- I think we can clearly presume it means it > doesn't get compressed twice. Obviously. > 2. is a symlink: > [...] "Behave sensibly". Basically that implies that a symlink gets updated if the link and its target are in the inclusion list. Don't rely on anything for obscure corner cases, but have the ebuild handle them explicitly. > 3. file is already compressed: > [...] > 4. bonus question: what if 'foo' and 'foo.$COMPEXT' both exist? See above.
Closing per comment #1.