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

Bug 545648

Summary: configuration options to post process files on install to shrink file size (e.g. pngcrush on png)
Product: Portage Development Reporter: xpue <r9ku1q>
Component: Conceptual/Abstract IdeasAssignee: Portage team <dev-portage>
Status: UNCONFIRMED ---    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description xpue 2015-04-05 19:33:52 UTC
e.g. to reduce startup time of an applications.

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2015-05-31 05:36:47 UTC
guess we could add something like:
  PORTAGE_CRUSH_<filetype>="<program> \"\${INPUT}\" \"\${OUTPUT}\""
then we'll execute this once for every file ending in ".<filetype>" with $INPUT and $OUTPUT set.  if the program returns an error, we silently ignore it and move on.  if the $OUTPUT is not actually smaller than $INPUT, then we ignore it.

i would say do it based on mime type, but that's prone to false positives.  should we restrict this to specific paths like /usr/share ?  can't see why we would ...