Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81025 - PKG_INSTALL_MASK (INSTALL_MASK for binary packages)
Summary: PKG_INSTALL_MASK (INSTALL_MASK for binary packages)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2005-02-06 13:11 UTC by solar (RETIRED)
Modified: 2006-03-11 14:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
portage-2.0.51.16-package_excludes.diff (portage-2.0.51.16-package_excludes.diff,1.73 KB, patch)
2005-02-06 13:13 UTC, solar (RETIRED)
Details | Diff
portage-2.1_pre5-package_excludes.diff (portage-2.1_pre5-package_excludes.diff,1.61 KB, patch)
2006-03-05 12:12 UTC, Rumen Yotov
Details | Diff
portage-2.1_pre5-r4.ebuild - modified (portage-2.1_pre5-r4.ebuild,5.06 KB, text/plain)
2006-03-05 12:16 UTC, Rumen Yotov
Details
portage-package-excludes.diff (portage-package-excludes.diff,1.76 KB, patch)
2006-03-05 14:14 UTC, solar (RETIRED)
Details | Diff
split misc preinst functions out of ebuild.sh (install_mask.patch,9.15 KB, patch)
2006-03-06 01:27 UTC, Zac Medico
Details | Diff
split misc functions out of ebuild.sh (doebuild_refactoring.patch,11.06 KB, patch)
2006-03-06 23:50 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description solar (RETIRED) gentoo-dev 2005-02-06 13:11:44 UTC
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.
Comment 1 solar (RETIRED) gentoo-dev 2005-02-06 13:13:16 UTC
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
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2005-02-16 19:10:13 UTC
buildpkg_excludes
buildpkg_excludes_path
Comment 3 solar (RETIRED) gentoo-dev 2005-02-16 19:37:45 UTC
I do not understand. 
Are those variables in the code you wish for me to use?

Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-10 16:07:34 UTC
Erm, INSTALL_MASK, or will that not work building binary packages?
Comment 5 Zac Medico gentoo-dev 2005-08-10 16:20:27 UTC
(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).
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-10 17:44:49 UTC
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.
Comment 7 solar (RETIRED) gentoo-dev 2006-02-18 14:09:31 UTC
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.
Comment 8 Rumen Yotov 2006-03-05 12:12:52 UTC
Created attachment 81426 [details, diff]
portage-2.1_pre5-package_excludes.diff
Comment 9 solar (RETIRED) gentoo-dev 2006-03-05 12:15:26 UTC
Anybody that objects to this going in please speak up now
Comment 10 Rumen Yotov 2006-03-05 12:16:51 UTC
Created attachment 81433 [details]
portage-2.1_pre5-r4.ebuild - modified
Comment 11 solar (RETIRED) gentoo-dev 2006-03-05 12:40:50 UTC
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.
Comment 12 Zac Medico gentoo-dev 2006-03-05 13:30:34 UTC
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.
Comment 13 solar (RETIRED) gentoo-dev 2006-03-05 14:14:15 UTC
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()
Comment 14 solar (RETIRED) gentoo-dev 2006-03-05 14:16:06 UTC
Ok to commit?
Comment 15 Zac Medico gentoo-dev 2006-03-05 14:35:27 UTC
(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?

Comment 16 Marius Mauch (RETIRED) gentoo-dev 2006-03-05 16:28:30 UTC
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.
Comment 17 solar (RETIRED) gentoo-dev 2006-03-05 17:37:34 UTC
Yeah I want to at all costs keep package install masking seperate from normal merge masking.
How about PKG_INSTALL_MASK= ?
Comment 18 Marius Mauch (RETIRED) gentoo-dev 2006-03-05 20:48:16 UTC
works for me too.
Comment 19 Zac Medico gentoo-dev 2006-03-06 01:27:09 UTC
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.
Comment 20 Zac Medico gentoo-dev 2006-03-06 23:50:56 UTC
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.
Comment 21 Zac Medico gentoo-dev 2006-03-07 19:57:36 UTC
Solar's patch is now in svn r2825 for release in 2.1_pre6.
Comment 22 Zac Medico gentoo-dev 2006-03-07 19:58:36 UTC
Oops, reopenning because it's not released yet.
Comment 23 Zac Medico gentoo-dev 2006-03-11 14:02:40 UTC
Released in 2.1_pre6.