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

Bug 296554

Summary: sys-apps-portage: ecompress should skip files which are already compressed
Product: Portage Development Reporter: Daniel Pielmeier <billie>
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 288499    
Attachments: add decompression support to ecompress (for dodoc)

Description Daniel Pielmeier gentoo-dev 2009-12-11 20:42:09 UTC
When using dodoc on a directory like this "dodoc dir/*" all files are queued for compression with "ecompress --queue "${dir}/${x##*/}"". If the directory already contains compressed files ecompress tries to compress them anyway.

This leads to various problems. If there are bzip2 compressed files and ${PORTAGE_COMPRESS} is also bzip2, bzip2 throws a warning "bzip2: Input file file.bz2 already has .bz2 suffix." If the folder contains gz files they are compressed again with bzip2 and you get bz.gzip2 compressed files.

So it would be nice if ecompress only treats uncompressed files.
Comment 1 Zac Medico gentoo-dev 2009-12-13 03:32:43 UTC
Created attachment 212844 [details, diff]
add decompression support to ecompress (for dodoc)

I've added decompression support to ecompress so that if the $PORTAGE_COMPRESS is empty then it automatically decompresses the docs for the user (consistent with ecompressdir behavior).
Comment 2 Zac Medico gentoo-dev 2009-12-13 06:34:57 UTC
This is fixed in 2.1.7.14 and 2.2_rc59.