Disable IUSE check for binary pkg API consumers.
authorZac Medico <zmedico@gentoo.org>
Mon, 11 Feb 2013 19:19:30 +0000 (11:19 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 11 Feb 2013 19:19:30 +0000 (11:19 -0800)
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).

bin/phase-functions.sh
bin/phase-helpers.sh
pym/portage/package/ebuild/_config/special_env_vars.py
pym/portage/package/ebuild/config.py

index 01c6f556ffb0532161c5a92de71989c5a5e9c364..5a40fcff6678c0ef5efac2e37969ba07c152c0b4 100644 (file)
@@ -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 \
index d278dd6702bd8de4be52ddae1b4d796ea59bc179..ac1c0761747d2b81fee3842da778c26024ecc274 100644 (file)
@@ -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
index 98e68d2bd01ce7f0769f61e29da821af2d637e07..8e85a4686e51ba4cc72de55c94778d4684307163 100644 (file)
@@ -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",
index 0090e4ed23184a154ecfc9192d143c615f2d8b68..fb7b741d2407da203a78e208f9e6087ecabb2241 100644 (file)
@@ -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()