From: Zac Medico Date: Mon, 11 Feb 2013 19:19:30 +0000 (-0800) Subject: Disable IUSE check for binary pkg API consumers. X-Git-Tag: v2.2.0_alpha162~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e9f0ada02765d1a97da8073c06b2d85800710909;p=portage.git Disable IUSE check for binary pkg API consumers. In the use() IUSE QA check, exempt binary packages for API consumers like Entropy which do not require a full profile with IUSE_IMPLICIT and stuff (see bug #456830). --- diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 01c6f556f..5a40fcff6 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -21,7 +21,7 @@ PORTAGE_READONLY_VARS="D EBUILD EBUILD_PHASE EBUILD_PHASE_FUNC \ PORTAGE_BZIP2_COMMAND PORTAGE_COLORMAP PORTAGE_CONFIGROOT \ PORTAGE_DEBUG PORTAGE_DEPCACHEDIR PORTAGE_EBUILD_EXIT_FILE \ PORTAGE_GID PORTAGE_GRPNAME PORTAGE_INST_GID PORTAGE_INST_UID \ - PORTAGE_IPC_DAEMON PORTAGE_IUSE PORTAGE_LOG_FILE \ + PORTAGE_INTERNAL_CALLER PORTAGE_IPC_DAEMON PORTAGE_IUSE PORTAGE_LOG_FILE \ PORTAGE_MUTABLE_FILTERED_VARS PORTAGE_OVERRIDE_EPREFIX \ PORTAGE_PYM_PATH PORTAGE_PYTHON \ PORTAGE_READONLY_METADATA PORTAGE_READONLY_VARS \ diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index d278dd670..ac1c07617 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -210,8 +210,11 @@ use() { #fi true - # Make sure we have this USE flag in IUSE - elif [[ -n $PORTAGE_IUSE && -n $EBUILD_PHASE ]] ; then + # Make sure we have this USE flag in IUSE, but exempt binary + # packages for API consumers like Entropy which do not require + # a full profile with IUSE_IMPLICIT and stuff (see bug #456830). + elif [[ -n $PORTAGE_IUSE && -n $EBUILD_PHASE && + -n $PORTAGE_INTERNAL_CALLER ]] ; then if [[ ! $u =~ $PORTAGE_IUSE ]] ; then if [[ ! ${EAPI} =~ ^(0|1|2|3|4|4-python|4-slot-abi)$ ]] ; then # This is only strict starting with EAPI 5, since implicit IUSE diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py b/pym/portage/package/ebuild/_config/special_env_vars.py index 98e68d2bd..8e85a4686 100644 --- a/pym/portage/package/ebuild/_config/special_env_vars.py +++ b/pym/portage/package/ebuild/_config/special_env_vars.py @@ -23,7 +23,8 @@ env_blacklist = frozenset(( "KEYWORDS", "LICENSE", "MERGE_TYPE", "PDEPEND", "PF", "PKGUSE", "PORTAGE_BACKGROUND", "PORTAGE_BACKGROUND_UNMERGE", "PORTAGE_BUILDDIR_LOCKED", - "PORTAGE_BUILT_USE", "PORTAGE_CONFIGROOT", "PORTAGE_IUSE", + "PORTAGE_BUILT_USE", "PORTAGE_CONFIGROOT", + "PORTAGE_INTERNAL_CALLER", "PORTAGE_IUSE", "PORTAGE_NONFATAL", "PORTAGE_PIPE_FD", "PORTAGE_REPO_NAME", "PORTAGE_USE", "PROPERTIES", "PROVIDE", "RDEPEND", "REPOSITORY", "RESTRICT", "ROOT", "SLOT", "SRC_URI" @@ -63,6 +64,7 @@ environ_whitelist += [ "PORTAGE_DOHTML_WARN_ON_SKIPPED_FILES", "PORTAGE_EBUILD_EXIT_FILE", "PORTAGE_FEATURES", "PORTAGE_GID", "PORTAGE_GRPNAME", + "PORTAGE_INTERNAL_CALLER", "PORTAGE_INST_GID", "PORTAGE_INST_UID", "PORTAGE_IPC_DAEMON", "PORTAGE_IUSE", "PORTAGE_LOG_FILE", "PORTAGE_OVERRIDE_EPREFIX", "PORTAGE_PIPE_FD", diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 0090e4ed2..fb7b741d2 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -844,6 +844,10 @@ class config(object): self[var] = default_val self.backup_changes(var) + if portage._internal_caller: + self["PORTAGE_INTERNAL_CALLER"] = "1" + self.backup_changes("PORTAGE_INTERNAL_CALLER") + # initialize self.features self.regenerate()