Merged from trunk 8435:8447
authorFabian Groffen <grobian@gentoo.org>
Tue, 6 Nov 2007 18:25:11 +0000 (18:25 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 6 Nov 2007 18:25:11 +0000 (18:25 -0000)
   | 8436      | Allow multislot packages to be added to the world file via |
   | zmedico   | --noreplace. Having these atoms in the world file will     |
   |           | trigger recommendations to run emaint in some cases, like  |
   |           | when running `emerge -e world`. The atoms need to be in    |
   |           | the world file to prevent multislot packages from being    |
   |           | removed by --depclean though.                              |

   | 8437      | remove O and PPID from being readonly. O is set python     |
   | WarnerBro | side (and we will hopefully stop being exported soon. PPID |
   |           | is ro by bash, so no need to declare it twice              |

   | 8438      | Bug #198129 - Prevent SLOT atoms like sys-devel/binutils:0 |
   | zmedico   | from being inappropriately recorded in the world file when |
   |           | USE=multislot is enabled.                                  |

   | 8439      | Fix create_world_atom() logic some more for bug #198129.   |
   | zmedico   |                                                            |

   | 8442      | Go ahead and exempt selected profile-specific USE_EXPAND   |
   | zmedico   | flags from IUSE QA Notices since we are planning to make   |
   |           | these particular flags into implicit members of IUSE. We   |
   |           | can make this extensible later, but for now we just want   |
   |           | to eliminate some useless QA Notices (a subset of bug      |
   |           | #70648). We're not exempting any non profile- specific     |
   |           | USE_EXPAND flags here. For non profile-specific flags, we  |
   |           | intend to implement an IUSE syntax extension (bug          |
   |           | #133327).                                                  |

   | 8444      | Remove references to ${O} in dyn_spec() since antarus made |
   | zmedico   | that variable mutable.                                     |

   | 8445      | Simplify and fix bugs in is_valid_package_atom().          |
   | zmedico   |                                                            |

   | 8447      | Remove the usage.obsolete "KEYWORDS contain -*" warning    |
   | zmedico   | since people are using -* to indicate that a package       |
   |           | should not be tried on archs other than those for which it |
   |           | already has KEYWORDS.                                      |

svn path=/main/branches/prefix/; revision=8449

bin/ebuild.sh
bin/misc-functions.sh
bin/repoman
pym/_emerge/__init__.py

index 1df41a54802f3b36f8d7804db51ab87a57f0ceb5..af347d7570fd1736b73f68050f710f2038061b34 100755 (executable)
@@ -165,7 +165,12 @@ useq() {
        fi
 
        # Make sure we have this USE flag in IUSE
-       if ! hasq "${u}" ${IUSE} ${E_IUSE} && ! hasq "${u}" ${PORTAGE_ARCHLIST} selinux; then
+       if ! hasq "${u}" ${IUSE} ${E_IUSE} && \
+               ! hasq "${u}" ${PORTAGE_ARCHLIST} selinux && \
+               [[ ${u} != arch_* ]] && \
+               [[ ${u} != elibc_* ]] && \
+               [[ ${u} != kernel_* ]] && \
+               [[ ${u} != userland_* ]] ; then
                eqawarn "QA Notice: USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}"
        fi
 
@@ -1442,7 +1447,7 @@ export S=${WORKDIR}/${P}
 
 unset E_IUSE E_DEPEND E_RDEPEND E_PDEPEND
 
-for x in T P PN PV PVR PR CATEGORY A EBUILD EMERGE_FROM O PPID FILESDIR PORTAGE_TMPDIR; do
+for x in T P PN PV PVR PR CATEGORY A EBUILD EMERGE_FROM FILESDIR PORTAGE_TMPDIR; do
        [[ ${!x-UNSET_VAR} != UNSET_VAR ]] && declare -r ${x}
 done
 # Need to be able to change D in dyn_preinst due to the IMAGE stuff
index 38b5c273498f2b89cb6185cdea01bcf7eabb9c8e..3c03e18e13ed2fa17a77432306c4b2e65999b29f 100644 (file)
@@ -615,7 +615,7 @@ dyn_package() {
 
 dyn_spec() {
        tar czf "/usr/src/rpm/SOURCES/${PF}.tar.gz" \
-               "${O}/${PF}.ebuild" "${O}/files" || \
+               "${EBUILD}" "${FILESDIR}" || \
                die "Failed to create base rpm tarball."
 
        cat <<__END1__ > ${PF}.spec
index 1eecd5b0513c1eed3795e84bcedaf7c154dbcaeb..e2ec992b4f60045ea2f3efa43bef61d4ab7e47eb 100755 (executable)
@@ -1239,9 +1239,6 @@ for x in scanlist:
 
                # KEYWORDS="-*" is a stupid replacement for package.mask and screws general KEYWORDS semantics
                if "-*" in keywords:
-                       stats["usage.obsolete"] += 1
-                       fails["usage.obsolete"].append(
-                               x+'/'+y+'.ebuild: KEYWORDS contain -*')
                        haskeyword = False
                        for kw in keywords:
                                if kw[0] == "~":
index 4094b6b9f2e6b40dd0a6c3a49a10d5c2e7529fb8..12832820bbe8009d7f91c1eb148568824a7f7b6c 100644 (file)
@@ -632,17 +632,40 @@ def create_world_atom(pkg_key, metadata, args_set, root_config):
                # If the user gave a specific atom, store it as a
                # slot atom in the world file.
                slot_atom = "%s:%s" % (cp, metadata["SLOT"])
-               # First verify the slot is in the portage tree to avoid
-               # adding a bogus slot like that produced by multislot.
-               if portdb.match(slot_atom):
-                       # Now verify that the argument is precise enough to identify a
-                       # specific slot.
-                       matches = portdb.match(arg_atom)
+
+               # For USE=multislot, there are a couple of cases to
+               # handle here:
+               #
+               # 1) SLOT="0", but the real SLOT spontaneously changed to some
+               #    unknown value, so just record an unslotted atom.
+               #
+               # 2) SLOT comes from an installed package and there is no
+               #    matching SLOT in the portage tree.
+               #
+               # Make sure that the slot atom is available in either the
+               # portdb or the vardb, since otherwise the user certainly
+               # doesn't want the SLOT atom recorded in the world file
+               # (case 1 above).  If it's only available in the vardb,
+               # the user may be trying to prevent a USE=multislot
+               # package from being removed by --depclean (case 2 above).
+
+               mydb = portdb
+               if not portdb.match(slot_atom):
+                       # SLOT seems to come from an installed multislot package
+                       mydb = vardb
+               # If there is no installed package matching the SLOT atom,
+               # it probably changed SLOT spontaneously due to USE=multislot,
+               # so just record an unslotted atom.
+               if vardb.match(slot_atom):
+                       # Now verify that the argument is precise
+                       # enough to identify a specific slot.
+                       matches = mydb.match(arg_atom)
                        matched_slots = set()
                        for cpv in matches:
-                               matched_slots.add(portdb.aux_get(cpv, ["SLOT"])[0])
+                               matched_slots.add(mydb.aux_get(cpv, ["SLOT"])[0])
                        if len(matched_slots) == 1:
                                new_world_atom = slot_atom
+
        if new_world_atom == sets["world"].findAtomForPackage(pkg_key, metadata):
                # Both atoms would be identical, so there's nothing to add.
                return None
@@ -4983,17 +5006,11 @@ def checkUpdatedNewsItems(portdb, vardb, NEWS_PATH, UNREAD_PATH, repo_id):
        return manager.getUnreadItems( repo_id, update=True )
 
 def is_valid_package_atom(x):
-       try:
-               testkey = portage.dep_getkey(x)
-       except portage.exception.InvalidData:
-               return False
-       if testkey.startswith("null/"):
-               testatom = x.replace(testkey[5:], "cat/"+testkey[5:])
-       elif "/" not in x:
-               testatom = "cat/"+x
-       else:
-               testatom = x
-       return portage.isvalidatom(testatom)
+       if "/" not in x:
+               alphanum = re.search(r'\w', x)
+               if alphanum:
+                       x = x[:alphanum.start()] + "cat/" + x[alphanum.start():]
+       return portage.isvalidatom(x)
 
 def show_blocker_docs_link():
        print