Merged from trunk 6382:6397
authorFabian Groffen <grobian@gentoo.org>
Sat, 14 Apr 2007 07:56:43 +0000 (07:56 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 14 Apr 2007 07:56:43 +0000 (07:56 -0000)
   +------------------------------------------------------------------------+
   | 6383     | Use a config instance that's not locked/immutable.          |
   | zmedico  |                                                             |
   |----------+-------------------------------------------------------------|
   | 6384     | Use catpkgsplit instead of pkgsplit for consistency with    |
   | zmedico  | usage elsewhere.                                            |
   |----------+-------------------------------------------------------------|
   | 6386     | Add CATEGORY to blacklisted variables since it can          |
   | zmedico  | interfere with CATEGORY guessing inside doebuild.           |
   |----------+-------------------------------------------------------------|
   | 6388     | Use relative paths inside ecompressdir in order to avoid    |
   | zmedico  | 'Argument list too long' errors with large file sets        |
   |          | (observed when installing sys-apps/man-pages).              |
   |----------+-------------------------------------------------------------|
   | 6392     | simplify unsafe file checking so files/paths with spaces    |
   | SpankMan | dont cause troubles                                         |
   |----------+-------------------------------------------------------------|
   | 6394     | create leading directories to match behavior of other do*   |
   | SpankMan | programs                                                    |
   |----------+-------------------------------------------------------------|
   | 6395     | document new version suffix style #166522                   |
   | SpankMan |                                                             |
   |----------+-------------------------------------------------------------|
   | 6396     | Prefix the hardlink source with ${D} like we always have.   |
   | zmedico  |                                                             |
   +------------------------------------------------------------------------+

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

bin/dohard
bin/ecompressdir
bin/misc-functions.sh
man/ebuild.5
pym/portage/__init__.py
pym/portage/dbapi/porttree.py

index 44b5a0ffd0552c3a2be9468e653463347f449c50..52ffae0875d1ab20ea6aa7da31fbd601ed9a8c7c 100755 (executable)
@@ -1,13 +1,14 @@
 #!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id: /var/cvsroot/gentoo-src/portage/bin/dohard,v 1.6 2004/10/04 13:56:50 vapier Exp $
+# $Id: $
 
 if [[ $# -ne 2 ]] ; then
        echo "$0: two arguments needed" 1>&2
        exit 1
 fi
 
-target=$1
-linkname=$2
-exec ln -f "${ED}${target}" "${ED}${linkname}"
+destdir=${2%/*}
+[[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
+
+exec ln -f "${ED}$1" "${ED}$2"
index 9cbf1d162beaca21303be4b9765e4acc6f5c5796..9befd84b02aac9698770c4b076be6cb0dc13ff05 100755 (executable)
@@ -102,6 +102,9 @@ for dir in "$@" ; do
                vecho "${0##*/}: ${dir#${ED}} does not exist!"
                continue
        fi
+       cd "${dir}"
+       actual_dir=${dir}
+       dir=. # use relative path to avoid 'Argument list too long' errors
 
        # hide all the stuff we want to skip
        hide_skip_dirs "${dir}"
@@ -122,7 +125,7 @@ for dir in "$@" ; do
 
        # now lets do our work
        [[ -z ${suffix} ]] && continue
-       vecho "${0##*/}: $(ecompress --bin) ${dir#${D}}"
+       vecho "${0##*/}: $(ecompress --bin) ${actual_dir#${D}}"
        funk_up_dir "compress" "${suffix}" "ecompress"
 
        # finally, restore the skipped stuff
index 58ee30c40fd4e57154c4e774c0900fb9ae5579b5..8ef23c6dc570362a387a511ee640f41c09a381d3 100644 (file)
@@ -45,18 +45,6 @@ install_qa_check() {
        cd "${ED}" || die "cd failed"
        prepall
 
-       declare -i UNSAFE=0
-       for i in $(find "${ED}/" -type f -perm -2002); do
-               ((UNSAFE++))
-               vecho "UNSAFE SetGID: $i"
-               chmod -s,o-w "$i"
-       done
-       for i in $(find "${ED}/" -type f -perm -4002); do
-               ((UNSAFE++))
-               vecho "UNSAFE SetUID: $i"
-               chmod -s,o-w "$i"
-       done
-
        # Now we look for all world writable files.
        for i in $(find "${ED}/" -type f -perm -2); do
                vecho -ne '\a'
@@ -199,8 +187,11 @@ install_qa_check() {
                PORTAGE_QUIET=${tmp_quiet}
        fi
 
-       if [[ ${UNSAFE} > 0 ]] ; then
-               die "There are ${UNSAFE} unsafe files. Portage will not install them."
+       local unsafe_files=$(find "${ED}" -type f '(' -perm -2002 -o -perm -4002 ')')
+       if [[ -n ${unsafe_files} ]] ; then
+               eqawarn "QA Notice: Unsafe files detected (set*id and world writable)"
+               eqawarn "${unsafe_files}"
+               die "Unsafe files found in \${ED}.  Portage will not install them."
        fi
 
        if [[ -d ${ED}/${D} ]] ; then
index 1d16a7e29f7ec2c986e10ecfccfea4709a165013..6eafaf177b2d3e221fbf39740b6698637508d28a 100644 (file)
@@ -185,8 +185,8 @@ The base atom is just a full category/packagename.  Hence, these are base atoms:
 .TP
 .B Atom Versions
 It is nice to be more specific and say that only certain versions of atoms are
-acceptable.  Note that versions must be combined with a prefix (see below).  Hence
-you may add a version number as a postfix to the base:
+acceptable.  Note that versions must be combined with a prefix (see below).  
+Hence you may add a version number as a postfix to the base:
 
 .nf
 sys\-apps/sed\fI\-4.0.5\fR
@@ -195,11 +195,12 @@ net\-misc/dhcp\fI\-3.0_p2\fR
 .fi
 
 Versions are normally made up of two or three numbers separated by periods, such
-as 1.2 or 4.5.2.  This string may be followed by a character such as 1.2a or 4.5.2z.
-Note that this letter is \fBnot\fR meant to indicate alpha, beta, etc... status.
-For that, use the optional suffix; either _alpha, _beta, _pre (pre\-release), _rc
-(release candidate), or _p (patch).  This means for the 3rd pre\-release of a package,
-you would use something like 1.2_pre3.
+as 1.2 or 4.5.2.  This string may be followed by a character such as 1.2a or 
+4.5.2z.  Note that this letter is \fBnot\fR meant to indicate alpha, beta, 
+etc... status.  For that, use the optional suffix; either _alpha, _beta, _pre 
+(pre\-release), _rc (release candidate), or _p (patch).  This means for the 
+3rd pre\-release of a package, you would use something like 1.2_pre3.  The 
+suffixes here can be arbitrarily chained without limitation.
 .TP
 .B Atom Prefix Operators [> >= = <= <]
 Sometimes you want to be able to depend on general versions rather than specifying
index 0e354d43915aa9a92fba269ecb4d79bf5ca46afa..fe615442a6f94d8a666b8952b9170fe96460768b 100644 (file)
@@ -1163,13 +1163,10 @@ class config:
                        self.lookuplist.reverse()
 
                        # Blacklist vars that could interfere with portage internals.
-                       for blacklisted in ["PKGUSE", "PORTAGE_CONFIGROOT", "ROOT",
-                                       "EPREFIX", "EROOT"]:
+                       for blacklisted in "CATEGORY", "PKGUSE", "PORTAGE_CONFIGROOT", \
+                               "ROOT", "EPREFIX", "EROOT":
                                for cfg in self.lookuplist:
-                                       try:
-                                               del cfg[blacklisted]
-                                       except KeyError:
-                                               pass
+                                       cfg.pop(blacklisted, None)
                        del blacklisted, cfg
 
                        if target_root is None:
@@ -4098,7 +4095,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                for cpv in portdb.match(match_atom):
                        # only use new-style matches
                        if cpv.startswith("virtual/"):
-                               pkgs[cpv] = (cpv, pkgsplit(cpv), portdb)
+                               pkgs[cpv] = (cpv, catpkgsplit(cpv)[1:], portdb)
                if kwargs["use_binaries"] and "vartree" in trees[myroot]:
                        vardb = trees[myroot]["vartree"].dbapi
                        for cpv in vardb.match(match_atom):
@@ -4106,7 +4103,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                                if cpv.startswith("virtual/"):
                                        if cpv in pkgs:
                                                continue
-                                       pkgs[cpv] = (cpv, pkgsplit(cpv), vardb)
+                                       pkgs[cpv] = (cpv, catpkgsplit(cpv)[1:], vardb)
                if not (pkgs or mychoices):
                        # This one couldn't be expanded as a new-style virtual.  Old-style
                        # virtuals have already been expanded by dep_virtual, so this one
index 11182d1c163db689f910b6b7999f1bee40a20d08..ad6ccc45a3888016179bd0a821442a60842569b3 100644 (file)
@@ -700,8 +700,8 @@ class portdbapi(dbapi):
                                match=1
                        uselist = []
                        if "?" in licenses:
-                               self.mysettings.setcpv(mycpv, mydb=self)
-                               uselist = self.mysettings.get("USE", "").split()
+                               self.doebuild_settings.setcpv(mycpv, mydb=self)
+                               uselist = self.doebuild_settings.get("USE", "").split()
                        try:
                                if self.mysettings.getMissingLicenses(
                                        licenses, mycpv, uselist):