PKG_EXCLUDEFROM = "/etc/portage/package_excludes" When this variable is set it will invoke tar with the --exclude-from option on GNU systems with the variable you defined in the dyn_package phase. This is mainly used to exclude man/doc/info files in order to gain smaller binary package sizes for use with embedded systems. Use with caution.
Created attachment 50557 [details, diff] portage-2.0.51.16-package_excludes.diff attach patch include the support for ebuild.sh and a badly worded description for the manfile. comments welcome
buildpkg_excludes buildpkg_excludes_path
I do not understand. Are those variables in the code you wish for me to use?
Erm, INSTALL_MASK, or will that not work building binary packages?
(In reply to comment #4) > Erm, INSTALL_MASK, or will that not work building binary packages? From comment #0 I think solar wants to minimize the binary package size. INSTALL_MASK does not affect binary package size because it is implemented in ebuild dyn_preinst(). Note that this feature request has some overlap with USE flags such as doc and minimal. Isn't it better to accomplish this with USE flags? With USE flags, you effectively have per-package package_excludes (as opposed to global package_excludes).
See the corresponding thread on gentoo-dev ML http://marc.theaimsgroup.com/?l=gentoo-dev&w=2&r=1&s=doc+use+flag&q=b on another note, FEATURES="noman noinfo nodoc" doesn't work on binpkgs either I take it ( hasn't looked at the code yet ). I figure not if Solar filed a bug.
Alec I dont think you posted the link you wanted to post. Yes the idea is to simply omit files from package tarball. noman,nodoc,noinfo cant be excluded from the tarball. the path usr/share/doc usr/share/man usr/share/info in the file package_excludes solves this on a global basis. Doing it on a per package basis would be fesiable to but I would want todo that as another option using env variables.
Created attachment 81426 [details, diff] portage-2.1_pre5-package_excludes.diff
Anybody that objects to this going in please speak up now
Created attachment 81433 [details] portage-2.1_pre5-r4.ebuild - modified
Comment on attachment 81433 [details] portage-2.1_pre5-r4.ebuild - modified Always use epatch from eutils.eclass. Never. patch -p1 < ${FILESDIR}"/portage-2.1_pre5-package_excludes.diff And no need to include euilds here.
Why don't we just make INSTALL_MASK work for both installation and package creation? If they must be separate, I'd prefer that the both have the same syntax. For example, PKG_EXCLUDEFROM could be implemented in a similar way to INSTALL_MASK and there would be no need for the "${USERLAND}" == "GNU" check.
Created attachment 81461 [details, diff] portage-package-excludes.diff New revision. Moves install masking logic into it's own function. Function: install_mask <rootdir> <glob> Existing install mask behavior stays the same while we pick up a new variable PACKAGE_EXCLUDES= that is called near right away when we enter dyn_install()
Ok to commit?
(In reply to comment #14) > Ok to commit? The only problem that I see left is that the install_mask function is in the ebuild environment when it really shouldn't be. However, this problem also goes for lots of other things that already pollute ebuild.sh. Could we move the install_mask functionality out of ebuild.sh alltogether and call it from doebuild in portage.py instead?
Minor isse, but I don't like the name PACKAGE_EXCLUDES, sounds more like "exclude packages than "exclude from packages", also doesn't sound related to INSTALL_MASK. Now PACKAGE_MASK is obviously a stupid name for this, how about INSTALL_MASK_{PRE,POST}PKG? As for the old INSTALL_MASK, it could be used to initalize both, not 100% compatible with the current way, but as it's more or less undocumented and rarely used I don't consider that a big issue.
Yeah I want to at all costs keep package install masking seperate from normal merge masking. How about PKG_INSTALL_MASK= ?
works for me too.
Created attachment 81491 [details, diff] split misc preinst functions out of ebuild.sh This patch splits several preinst functions out of ebuild.sh in order to reduce unnecessary pollution of the ebuild.sh environment with miscellaneous functions. The miscellaneous functions now run from misc-functions.sh, which sources ebuild.sh in order to inherit the environment. We can continue to use this approach to migrate more miscellaneous functions out of the ebuild.sh environment.
Created attachment 81580 [details, diff] split misc functions out of ebuild.sh Some minor changes: 1. The IMAGE variable is now generated inside doebuild. 2. SIGINT and SIGQUIT are automatically trapped by misc-functions.sh.
Solar's patch is now in svn r2825 for release in 2.1_pre6.
Oops, reopenning because it's not released yet.
Released in 2.1_pre6.