Merged from trunk 6291:6307
authorFabian Groffen <grobian@gentoo.org>
Wed, 28 Mar 2007 19:26:57 +0000 (19:26 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 28 Mar 2007 19:26:57 +0000 (19:26 -0000)
   +------------------------------------------------------------------------+
   | 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                 |
   |           | <jokey@gentoo.org> 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

bin/ebuild.sh
man/make.conf.5
pym/emerge/__init__.py
pym/portage/dbapi/porttree.py

index 5f4b1777b983a51afdcc392056214c768c2cde9f..f3f871b66afed1eed5ae4c4c9822fd78711ef183 100755 (executable)
@@ -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
index 088a54ab20987b37e279865c135e06526075e514..168523efa3955238c6ea607e4c668bcf1795d1e9 100644 (file)
@@ -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
index 728b6b984491ea359073ed76a2995778e7f08f9b..df05505544bf5959b1053b12cde7e62426d7b5c9 100644 (file)
@@ -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)
index af14499d67380a735061e47dc12deb8786ab9a07..11182d1c163db689f910b6b7999f1bee40a20d08 100644 (file)
@@ -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):