From: Fabian Groffen Date: Wed, 28 Mar 2007 19:26:57 +0000 (-0000) Subject: Merged from trunk 6291:6307 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=3c832dd723dcbfd6b2d34bd0fb9aadd9eff8bba7;p=portage.git Merged from trunk 6291:6307 +------------------------------------------------------------------------+ | 6291 | minor name changes for bin tests, svn propset keywords Id | | WarnerBro | stuff | |-----------+------------------------------------------------------------| | 6292 | Continue to support profile masking at least until bug | | zmedico | #170697 is settled. | |-----------+------------------------------------------------------------| | 6297 | source ${T}/environment before the definition of | | zmedico | qa_source() and qa_call() so that the call stack shows the | | | original files and line numbers instead of those from | | | ${T}/environment. Thanks to Markus Ullmann | | | for reporting. | |-----------+------------------------------------------------------------| | 6299 | Filter the readonly attribute from variables saved in | | zmedico | ${T}/environment to prevent 'readonly variable' error | | | messages in later phases. | |-----------+------------------------------------------------------------| | 6301 | Properly anchor sed regexp for readlonly attribut | | zmedico | filtering. | |-----------+------------------------------------------------------------| | 6303 | Synchronize PORTAGE_COMPRESS_FLAGS to reflect that -9 is | | zmedico | the default now. | |-----------+------------------------------------------------------------| | 6305 | Convert "ebuild" and "binary" "nomerge" nodes into | | zmedico | "installed" nodes for greater consistency in the depgraph. | |-----------+------------------------------------------------------------| | 6307 | Correctly pull the metadata again when the node is | | zmedico | converted. | +------------------------------------------------------------------------+ svn path=/main/branches/prefix/; revision=6313 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 5f4b1777b..f3f871b66 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -18,6 +18,12 @@ fi declare -rx EBUILD_PHASE +if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "nofetch" ]; then + if [ -f "${T}/environment" ]; then + source "${T}/environment" >& /dev/null + fi +fi + # These two functions wrap sourcing and calling respectively. At present they # perform a qa check to make sure eclasses and ebuilds and profiles don't mess # with shell opts (shopts). Ebuilds/eclasses changing shopts should reset them @@ -43,12 +49,6 @@ qa_call() { return 0 } -if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "nofetch" ]; then - if [ -f "${T}/environment" ]; then - qa_source "${T}/environment" &>/dev/null - fi -fi - # subshell die support EBUILD_MASTER_PID=$$ trap 'exit 1' SIGTERM @@ -1067,7 +1067,7 @@ dyn_compile() { echo "${EAPI:-0}" > EAPI set +f set > environment - export -p | sed 's:declare -rx:declare -x:' >> environment + export | sed 's:^declare -rx:declare -x:' >> environment bzip2 -f9 environment cp "${EBUILD}" "${PF}.ebuild" @@ -1773,7 +1773,8 @@ if [ -n "${myarg}" ] && \ # Save current environment and touch a success file. (echo for success) umask 002 set | @EGREP@ -v "^SANDBOX_" > "${T}/environment" 2>/dev/null - export | @EGREP@ -v "^declare -x SANDBOX_" >> "${T}/environment" 2>/dev/null + export | @EGREP@ -v "^declare -x SANDBOX_" | \ + @SED@ 's:^declare -rx:declare -x:' >> "${T}/environment" 2>/dev/null chown ${PORTAGE_USER:-portage}:${PORTAGE_GROUP:-portage} "${T}/environment" &>/dev/null chmod g+w "${T}/environment" &>/dev/null fi diff --git a/man/make.conf.5 b/man/make.conf.5 index 088a54ab2..168523efa 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -329,7 +329,7 @@ the host that creates the binary packages and not to the root of the \fBPKGDIR\f This variable contains the command used to compress documentation during the install phase. .TP -\fBPORTAGE_COMPRESS_FLAGS\fR = \fI"\-f9"\fR +\fBPORTAGE_COMPRESS_FLAGS\fR = \fI"\-9"\fR This variable contains flags for the \fBPORTAGE_COMPRESS\fR command. .TP .B PORTAGE_ELOG_CLASSES diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 728b6b984..df0550554 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -1161,10 +1161,14 @@ class depgraph: if addme: metadata = dict(izip(self._mydbapi_keys, mydbapi.aux_get(mykey, self._mydbapi_keys))) - if merging == 0 and vardbapi.cpv_exists(mykey): - metadata["USE"] = vardbapi.aux_get(mykey, ["USE"])[0] - myuse = metadata["USE"].split() - metadata["SLOT"] = vardbapi.aux_get(mykey, ["SLOT"])[0] + if merging == 0 and vardbapi.cpv_exists(mykey) and \ + mytype != "installed": + mybigkey[0] = "installed" + mydbapi = vardbapi + jbigkey = tuple(mybigkey) + metadata = dict(izip(self._mydbapi_keys, + mydbapi.aux_get(mykey, self._mydbapi_keys))) + myuse = mydbapi.aux_get(mykey, ["USE"])[0].split() slot_atom = "%s:%s" % (portage.dep_getkey(mykey), metadata["SLOT"]) existing_node = self._slot_node_map[myroot].get( slot_atom, None) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index af14499d6..11182d1c1 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -622,6 +622,19 @@ class portdbapi(dbapi): except ValueError: pass + profile_atoms = self.mysettings.prevmaskdict.get(mycp) + if profile_atoms: + for x in profile_atoms: + #important: only match against the still-unmasked entries... + #notice how we pass "newlist" to the xmatch() call below.... + #Without this, ~ deps in the packages files are broken. + mymatches=self.xmatch("match-list",x,mylist=newlist) + if mymatches is None: + #error in packages file; print warning and continue: + print "emerge: visible(): profile packages entry \""+x+"\" is invalid, ignoring..." + continue + newlist = [cpv for cpv in newlist if cpv in mymatches] + return newlist def gvisible(self,mylist):