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

Bug 214619

Summary: Passing custom options to tar invocation
Product: Portage Development Reporter: Robin Johnson <robbat2>
Component: Binary packages supportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: 2.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 216231    
Attachments: PORTAGE_BINPKG_TAR_OPTS implementation and $PWD tweaks

Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-03-24 23:27:42 UTC
Doing some work on my system having most of my system compiled with -pg, Portage got to spewing collisions between all the gmon.out files that got generated. Using INSTALL_MASK is insufficient, because the install mask handling generates more gmon.out files ;-).

Could we please have a variable to pass custom options to the tar invocation in dyn_package? This lets me pass --exclude as well as -X and anything else useful (maybe options to preserve xattrs).
Comment 1 Zac Medico gentoo-dev 2008-03-28 05:31:21 UTC
Maybe PKG_INSTALL_MASK (which is already supported) will solve your problem with the gmon.out files. Anyway, I'll do a patch to implement PORTAGE_BINPKG_TAR_OPTS.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-03-28 18:29:10 UTC
INSTALL_MASK/PKG_INSTALL_MASK aren't sufficent because it needs full pathes to the files - AND the find invocation in install_mask() leaves gmon.out file of it's own, because it runs from ${D}.

Changing it to run from ${T}, and changing the dyn_package tar to run from ${D} as well might also be an improvement.
Comment 3 Zac Medico gentoo-dev 2008-03-29 05:45:59 UTC
Okay, preinst_mask() and dyn_package() (which process INSTALL_MASK and PKG_INSTALL_MASK) are both called from ${T} now. Also, preinst_mask() is called after all other functions so that INSTALL_MASK can be used to remove all gmon.out files.

(In reply to comment #2)
> INSTALL_MASK/PKG_INSTALL_MASK aren't sufficent because it needs full pathes to
> the files

Here's how install mask works:

set -o noglob
for no_inst in ${install_mask}; do
	set +o noglob
	rm -Rf "${root}"/${no_inst} >&/dev/null
	find "${root}" -path "${no_inst}" -exec rm -fR {} \; >/dev/null
done

It seems like you should be able to use INSTALL_MASK="gmon.out */gmon.out" to match all gmon.out files anywhere in ${D} (the first would work via rm and the second would work via find -path).
Comment 4 Zac Medico gentoo-dev 2008-03-29 06:04:03 UTC
Created attachment 147606 [details, diff]
PORTAGE_BINPKG_TAR_OPTS implementation and $PWD tweaks
Comment 5 Zac Medico gentoo-dev 2008-04-04 22:24:23 UTC
This is fixed in 2.1.5_rc1.