Merged from trunk -r15169:15174
authorFabian Groffen <grobian@gentoo.org>
Fri, 8 Jan 2010 07:48:41 +0000 (07:48 -0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 8 Jan 2010 07:48:41 +0000 (07:48 -0000)
   | 15172   | Fix it so an empty directory given to doins -r does not      |
   | zmedico | trigger failure.                                             |

   | 15173   | Add a TODO comment for improved handling of /lib/modules.    |
   | zmedico |                                                              |

   | 15174   | Bug #269225 - Warn about virtuals with non-empty HOMEPAGE or |
   | zmedico | LICENSE. Thanks to Ulrich Müller <ulm@g.o> for this patch.  |

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

bin/ebuild-helpers/doins
bin/repoman
man/repoman.1
pym/portage/dbapi/vartree.py

index 3eb598a745c1db2f0208718dd5b264b675af659f..c5ac50dfa37fe2958bbaf4df47f89a89d358a6d7 100755 (executable)
@@ -71,16 +71,12 @@ _doins() {
 }
 
 _xdoins() {
-       local -i success=0 failed=0
+       local -i failed=0
        while read -d $'\0' x ; do
                _doins "$x" "${x%/*}"
-               if [[ $? -eq 0 ]] ; then
-                       ((success|=1))
-               else
-                       ((failed|=1))
-               fi
+               ((failed|=$?))
        done
-       [[ $failed -ne 0 || $success -eq 0 ]] && return 1 || return 0
+       return $failed
 }
 
 success=0
@@ -117,6 +113,9 @@ for x in "$@" ; do
                find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \;
                find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins
                if [[ ${PIPESTATUS[1]} -eq 0 ]] ; then
+                       # NOTE: Even if only an empty directory is installed here, it
+                       # still counts as success, since an empty directory given as
+                       # an argument to doins -r should not trigger failure.
                        ((success|=1))
                else
                        ((failed|=1))
index d8f2ac8cd821e6fcfd468669bd45f6521458927d..784787d0d0247d303821d2b6609494d76c595625 100755 (executable)
@@ -276,6 +276,7 @@ qahelp={
        "KEYWORDS.stable":"Ebuilds that have been added directly with stable KEYWORDS",
        "KEYWORDS.stupid":"Ebuilds that use KEYWORDS=-* instead of package.mask", 
        "LICENSE.missing":"Ebuilds that have a missing or empty LICENSE variable",
+       "LICENSE.virtual":"Virtuals that have a non-empty LICENSE variable",
        "DESCRIPTION.missing":"Ebuilds that have a missing or empty DESCRIPTION variable",
        "DESCRIPTION.toolong":"DESCRIPTION is over %d characters" % max_desc_len,
        "EAPI.definition":"EAPI is defined after an inherit call (must be defined before)",
@@ -283,6 +284,7 @@ qahelp={
        "EAPI.unsupported":"Ebuilds that have an unsupported EAPI version (you must upgrade portage)",
        "SLOT.invalid":"Ebuilds that have a missing or invalid SLOT variable value",
        "HOMEPAGE.missing":"Ebuilds that have a missing or empty HOMEPAGE variable",
+       "HOMEPAGE.virtual":"Virtuals that have a non-empty HOMEPAGE variable",
        "DEPEND.bad":"User-visible ebuilds with bad DEPEND settings (matched against *visible* ebuilds)",
        "RDEPEND.bad":"User-visible ebuilds with bad RDEPEND settings (matched against *visible* ebuilds)",
        "PDEPEND.bad":"User-visible ebuilds with bad PDEPEND settings (matched against *visible* ebuilds)",
@@ -359,6 +361,8 @@ qawarnings = set((
 "DEPEND.badmaskedindev","RDEPEND.badmaskedindev","PDEPEND.badmaskedindev",
 "DEPEND.badtilde", "RDEPEND.badtilde", "PDEPEND.badtilde",
 "DESCRIPTION.toolong",
+"HOMEPAGE.virtual",
+"LICENSE.virtual",
 "KEYWORDS.dropped",
 "KEYWORDS.stupid",
 "KEYWORDS.missing",
@@ -1381,6 +1385,13 @@ for x in scanlist:
                                stats[myqakey]=stats[myqakey]+1
                                fails[myqakey].append(x+"/"+y+".ebuild")
 
+               if catdir == "virtual":
+                       for var in ("HOMEPAGE", "LICENSE"):
+                               if myaux.get(var):
+                                       myqakey = var + ".virtual"
+                                       stats[myqakey] = stats[myqakey] + 1
+                                       fails[myqakey].append(relative_path)
+
                # 14 is the length of DESCRIPTION=""
                if len(myaux['DESCRIPTION']) > max_desc_len:
                        stats['DESCRIPTION.toolong'] += 1
index dd318a3f94edc564393ede96a87b4ae1b103fb1f..129ffd00bac4bbedb9c542e251449bba9d63b098 100644 (file)
@@ -119,6 +119,9 @@ Ebuilds that have an unsupported EAPI version (you must upgrade portage)
 .B HOMEPAGE.missing
 Ebuilds that have a missing or empty HOMEPAGE variable
 .TP
+.B HOMEPAGE.virtual
+Virtuals that have a non-empty HOMEPAGE variable
+.TP
 .B IUSE.invalid
 This ebuild has a variable in IUSE that is not in the use.desc or its metadata.xml file
 .TP
@@ -149,6 +152,9 @@ Ebuilds that have a missing or empty LICENSE variable
 .B LICENSE.syntax
 Syntax error in LICENSE (usually an extra/missing space/parenthesis)
 .TP
+.B LICENSE.virtual
+Virtuals that have a non-empty LICENSE variable
+.TP
 .B LIVEVCS.stable
 Ebuild is a live ebuild (cvs, git, darcs, svn, etc) checkout with stable keywords.
 .TP
index 7be3a205e628cfba3a756f93115bf16a2aa0c3ac..74287ebb6a09e96948226caec9dd6e6a987bb2ce 100644 (file)
@@ -3524,6 +3524,10 @@ class dblink(object):
                                # upgraded. We effectively only want one half of the config protection
                                # functionality for /lib/modules. For portage-ng both capabilities
                                # should be able to be independently specified.
+                               # TODO: For rebuilds, re-parent previous modules to the new
+                               # installed instance (so they are not orphans). For normal
+                               # uninstall (not rebuild/reinstall), remove the modules along
+                               # with all other files (leave no orphans).
                                if obj.startswith(modprotect):
                                        show_unmerge("---", unmerge_desc["cfgpro"], file_type, obj)
                                        continue