Merge with trunk - r2636:2661
authorKito <kito@gentoo.org>
Sun, 5 Feb 2006 04:10:05 +0000 (04:10 -0000)
committerKito <kito@gentoo.org>
Sun, 5 Feb 2006 04:10:05 +0000 (04:10 -0000)
svn path=/main/branches/prefix/; revision=2662

23 files changed:
bin/dobin
bin/doconfd
bin/dodir
bin/doenvd
bin/dohard
bin/doinitd
bin/dosbin
bin/dosym
bin/ebuild.sh
bin/emerge
bin/newbin
bin/newconfd
bin/newdoc
bin/newenvd
bin/newexe
bin/newinitd
bin/newins
bin/newlib.a
bin/newlib.so
bin/newman
bin/newsbin
cnf/etc-update.conf
pym/portage.py

index c14e9cc73d12898f74d9d7a19c3599d28f62361d..79075946aeabaf207301821f547a18b534a70cd1 100755 (executable)
--- a/bin/dobin
+++ b/bin/dobin
@@ -3,26 +3,30 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/dobin,v 1.13 2004/10/04 13:56:50 vapier Exp $
 
-if [ ${#} -lt 1 ] ; then
-       echo "${0}: at least one argument needed"
+if [[ $# -lt 1 ]] ; then
+       echo "$0: at least one argument needed" 1>&2
        exit 1
 fi
 
-if [ ! -d "${D}${DESTTREE}/bin" ] ; then
+if [[ ! -d ${D}${DESTTREE}/bin ]] ; then
        install -d "${D}${DESTTREE}/bin" || exit 2
 fi
 
+case ${CHOST} in
+       *-freebsd*) group=wheel ;;
+       *)          group=root ;;
+esac
+
+ret=0
+
 for x in "$@" ; do
-       if [ -x "${x}" ] ; then
-               #if executable, use existing perms
-               install "${x}" "${D}${DESTTREE}/bin" || exit 3
+       if [[ -e ${x} ]] ; then
+               install -m0755 -o root -g ${group} "${x}" "${D}${DESTTREE}/bin"
        else
-               #otherwise, use reasonable defaults
-               echo ">>> dobin: making ${x} executable..."
-               if [ "$USERLAND" == "GNU" ]; then
-                       install -m0755 -o root -g root  "${x}" "${D}${DESTTREE}/bin" || exit 4
-               else
-                       install -m0755 -o root -g wheel "${x}" "${D}${DESTTREE}/bin" || exit 4
-               fi
+               echo "!!! ${0##*/}: ${x} does not exist" 1>&2
+               false
        fi
+       ((ret+=$?))
 done
+
+exit ${ret}
index 23576f0aeb5aa1f194670f15bd9ac50731edc9da..4ee72ad4c8b38c4de816b32a871b0a3a6fa0c9ec 100755 (executable)
@@ -3,13 +3,12 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/doconfd,v 1.2.2.1 2005/01/13 04:51:56 vapier Exp $
 
-if [ ${#} -lt 1 ] ; then
-       echo "doconfd: at least one argument needed"
+if [[ $# -lt 1 ]] ; then
+       echo "$0: at least one argument needed" 1>&2
        exit 1
 fi
 
-tmp_INSDESTTREE="${INSDESTTREE}"
-INSDESTTREE=/etc/conf.d/
+exec \
+env \
+INSDESTTREE="/etc/conf.d/" \
 doins "$@"
-INSDESTTREE="${tmp_INSDESTTREE}"
-unset tmp_INSDESTTREE
index c4cd0f66c7cf9506692536b6dda3ff299d44291a..6c45b59c22a5c11afdaa662d6e6475876970af55 100755 (executable)
--- a/bin/dodir
+++ b/bin/dodir
@@ -3,6 +3,5 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/dodir,v 1.5 2004/10/04 13:56:50 vapier Exp $
 
-for x in "$@" ; do
-       install -d ${DIROPTIONS} "${D}${x}"
-done
+slash=/
+exec install -d ${DIROPTIONS} "${@/#${slash}/${D}${slash}}"
index e9adc7941961decaf738082c9ab37c8df693b4df..038a583bfd8b0fccc1e543643c9847094af8ff8f 100755 (executable)
@@ -3,13 +3,12 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/doenvd,v 1.2.2.1 2005/01/13 04:51:56 vapier Exp $
 
-if [ ${#} -lt 1 ] ; then
-       echo "doenvd: at least one argument needed"
+if [[ $# -lt 1 ]] ; then
+       echo "$0: at least one argument needed" 1>&2
        exit 1
 fi
 
-tmp_INSDESTTREE="${INSDESTTREE}"
-INSDESTTREE=/etc/env.d/
+exec \
+env \
+INSDESTTREE="/etc/env.d/" \
 doins "$@"
-INSDESTTREE="${tmp_INSDESTTREE}"
-unset tmp_INSDESTTREE
index ebe23afd4332793b54571e9548df376ffb6bb779..97c46495a12b284c8f3a41cf7438b3c01afc8b19 100755 (executable)
@@ -3,11 +3,11 @@
 # 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 $
 
-if [ ${#} -ne 2 ] ; then
-       echo "${0}: two arguments needed"
+if [[ $# -ne 2 ]] ; then
+       echo "$0: two arguments needed" 1>&2
        exit 1
 fi
 
-mysrc="${1}"
-mydest="${2}"
-ln -f "${D}${mysrc}" "${D}${mydest}"
+target=$1
+linkname=$2
+exec ln -f "${D}${target}" "${D}${linkname}"
index 8f2926f83890a90b545ff1d3c1263fa50b3c606b..3f579462d52a36721d40a8a2e23d30ab142d5cc5 100755 (executable)
@@ -3,13 +3,12 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/doinitd,v 1.2.2.1 2005/01/13 04:51:56 vapier Exp $
 
-if [ ${#} -lt 1 ] ; then
-       echo "doinitd: at least one argument needed"
+if [[ $# -lt 1 ]] ; then
+       echo "$0: at least one argument needed" 1>&2
        exit 1
 fi
 
-tmp_EXEDESTTREE="${EXEDESTTREE}"
-EXEDESTTREE=/etc/init.d/
+exec \
+env \
+EXEDESTTREE="/etc/init.d/" \
 doexe "$@"
-EXEDESTTREE="${tmp_EXEDESTTREE}"
-unset tmp_EXEDESTTREE
index 65df3aab33ad0fb6bb7dc4dbc7dc78434de9a9bc..14ff27f158a8dae7cecf218ad0cd04a370944e96 100755 (executable)
@@ -3,25 +3,30 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/dosbin,v 1.11 2004/10/04 13:56:50 vapier Exp $
 
-if [ ${#} -lt 1 ] ; then
-       echo "${0}: at least one argument needed"
+if [[ $# -lt 1 ]] ; then
+       echo "$0: at least one argument needed" 1>&2
        exit 1
 fi
-if [ ! -d "${D}${DESTTREE}/sbin" ] ; then
+
+if [[ ! -d ${D}${DESTTREE}/sbin ]] ; then
        install -d "${D}${DESTTREE}/sbin" || exit 2
 fi
 
+case ${CHOST} in
+       *-freebsd*) group=wheel ;;
+       *)          group=root ;;
+esac
+
+ret=0
+
 for x in "$@" ; do
-       if [ -x "${x}" ] ; then
-               #if executable, use existing perms
-               install -m0755 "${x}" "${D}${DESTTREE}/sbin" || exit 3
+       if [[ -e ${x} ]] ; then
+               install -m0755 -o root -g ${group} "${x}" "${D}${DESTTREE}/sbin"
        else
-               #otherwise, use reasonable defaults
-               echo ">>> dosbin: making ${x} executable..."
-    if [ "$USERLAND" == "GNU" ]; then
-      install -m0755 -o root -g root  "${x}" "${D}${DESTTREE}/sbin" || exit 4
-    else
-      install -m0755 -o root -g wheel "${x}" "${D}${DESTTREE}/sbin" || exit 4
-    fi
+               echo "!!! ${0##*/}: ${x} does not exist" 1>&2
+               false
        fi
+       ((ret+=$?))
 done
+
+exit ${ret}
index 18efade4f94288cfa6237c29a78014e53b1920b5..5a5cd287f035961051ce382ee96e10ff7df18619 100755 (executable)
--- a/bin/dosym
+++ b/bin/dosym
@@ -4,7 +4,7 @@
 # $Id: /var/cvsroot/gentoo-src/portage/bin/dosym,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
 if [[ $# -ne 2 ]] ; then
-       echo "${0}: two arguments needed"
+       echo "$0: two arguments needed" 1>&2
        exit 1
 fi
 
index 3041eab802fa499a2ada32e3a986c6f41875112f..bf6b9c3f4d133114e1e2d8389643347962cadc51 100755 (executable)
@@ -58,7 +58,7 @@ set_colors
 # the sandbox is disabled by default except when overridden in the relevant stages
 export SANDBOX_ON="0"
 
-# sandbox support functions; defined prior to profile.bashrc srcing, since the profile might need to add a default exception (/usr/lib64/conftest fex, bug #60147)
+# sandbox support functions; defined prior to profile.bashrc srcing, since the profile might need to add a default exception (/usr/lib64/conftest fex)
 addread() {
        export SANDBOX_READ="$SANDBOX_READ:$1"
 }
@@ -2006,8 +2006,8 @@ export TMPDIR="${T}"
 # That will test for unset *or* NULL ("").  We want just to set for unset...
 
 #turn off glob expansion from here on in to prevent *'s and ? in the DEPEND
-#syntax from getting expanded :)  Fixes bug #1473
-#check eclass rdepends also. bug #58819
+#syntax from getting expanded :)
+#check eclass rdepends also.
 set -f
 if [ "${RDEPEND-unset}" == "unset" ] && [ "${E_RDEPEND-unset}" == "unset" ] ; then
        export RDEPEND="${DEPEND} ${E_DEPEND}"
index 946f676244036ed206c02c2cef091bdc567073b0..4c16742a3295798365baaa79185022dedfdd6102 100755 (executable)
@@ -76,7 +76,14 @@ if "candy" in portage.settings.features:
 if (not sys.stdout.isatty()) or (portage.settings["NOCOLOR"] in ["yes","true"]):
        nocolor()
 
+
+
 def normpath(mystr):
+       """ 
+               os.path.normpath("//foo") returns "//foo" instead of "/foo"
+               We dislike this behavior so we create our own normpath func
+               to fix it.
+       """
        if mystr and (mystr[0]=='/'):
                return os.path.normpath("///"+mystr)
        else:
@@ -1140,14 +1147,14 @@ class depgraph:
                                        portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n")
                                        portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
                                        portage.writemsg("!!! to aid in the detection of malicious intent.\n\n")
-                                       portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF A TAMPERED FILES -- CHECK CAREFULLY.\n")
+                                       portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF TAMPERED FILES -- CHECK CAREFULLY.\n")
                                        portage.writemsg("!!! Affected file: %s\n" % (e))
                                        sys.exit(1)
                                except portage_exception.InvalidSignature, e:
                                        portage.writemsg("\n\n!!! An invalid gpg signature is preventing portage from calculating the\n")
                                        portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
                                        portage.writemsg("!!! to aid in the detection of malicious intent.\n\n")
-                                       portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF A TAMPERED FILES -- CHECK CAREFULLY.\n")
+                                       portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF TAMPERED FILES -- CHECK CAREFULLY.\n")
                                        portage.writemsg("!!! Affected file: %s\n" % (e))
                                        sys.exit(1)
                                except SystemExit, e:
@@ -1347,7 +1354,7 @@ class depgraph:
                                        binpkguseflags=portage.db[portage.root]["bintree"].get_use(myeb_pkg)
                                        myk=["binary",myroot,myeb_pkg]
                                else:
-                                       sys.stderr.write("!!! Confused... Don't know what I'm using for dependency info. :(\n")
+                                       sys.stderr.write("!!! Confused... Don't know what's being used for dependency info. :(\n")
                                        sys.exit(1)
 
                                #if "--usepkg" in myopts:
@@ -1870,8 +1877,8 @@ class depgraph:
                if ("--fetchonly" not in myopts) and ("--buildpkgonly" not in myopts):
                        for x in mylist:
                                if x[0]=="blocks":
-                                       print "\n!!! Error: the "+x[2]+" package conflicts with another package."
-                                       print   "!!!        both can't be installed on the same system together."
+                                       print "\n!!! Error: the "+x[2]+" package conflicts with another package;"
+                                       print   "!!!        the two packages cannot be installed on the same system together."
                                        print   "!!!        Please use 'emerge --pretend' to determine blockers."
                                        print
                                        if ("--pretend" not in myopts):
@@ -1975,8 +1982,8 @@ class depgraph:
                                pkgindex=3
                        y=portage.portdb.findname(x[pkgindex])
                        if not "--pretend" in myopts:
-                               print ">>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+")",x[pkgindex],"to",x[1]
-                               emergelog(" >>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" to "+x[1])
+                               print ">>> Emerging ("+str(mergecount)+" of "+str(len(mymergelist))+")",x[pkgindex],"to",x[1]
+                               emergelog(" >>> Emerging ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" to "+x[1])
 
                        self.pkgsettings["EMERGE_FROM"] = x[0][:]
                        self.pkgsettings.backup_changes("EMERGE_FROM")
@@ -2268,7 +2275,7 @@ def unmerge(unmerge_action, unmerge_files):
                                candidate_catpkgs.append("="+string.join(sp_absx[sp_vdb_len:],"/"))
 
        if (("--pretend" in myopts) or ("--ask" in myopts)) and not ("--quiet" in myopts):
-               print darkgreen("\n>>> These are the packages that I would unmerge:")
+               print darkgreen("\n>>> These are the packages that would be unmerged:")
 
        pkgmap={}
        numselected=0
@@ -2331,7 +2338,7 @@ def unmerge(unmerge_action, unmerge_files):
                return 0
 
        if not numselected:
-               print "\n>>>",unmerge_action+": No packages selected for removal.\n"
+               print "\n>>> No packages selected for removal by",unmerge_action+".\n"
                return 0
 
        for x in pkgmap.keys():
@@ -2668,15 +2675,15 @@ if myaction in ["sync","rsync","metadata"] and (not "--help" in myopts):
                                                print "Quitting."
                                                print
                                                sys.exit(0)
-                               emergelog(">>> starting rsync with "+dosyncuri)
+                               emergelog(">>> Starting rsync with "+dosyncuri)
                                if "--quiet" not in myopts:
-                                       print ">>> starting rsync with "+dosyncuri+"..."
+                                       print ">>> Starting rsync with "+dosyncuri+"..."
                        else:
                                emergelog(">>> Starting retry %d of %d with %s" % (retries,maxretries,dosyncuri))
                                print "\n\n>>> Starting retry %d of %d with %s" % (retries,maxretries,dosyncuri)
 
                        if "--quiet" not in myopts:
-                               print ">>> checking server timestamp ..."
+                               print ">>> Checking server timestamp ..."
                        mycommand=rsynccommand+" "+dosyncuri+"/metadata/timestamp.chk "+tmpservertimestampdir
                        exitcode=portage.spawn(mycommand,portage.settings,free=1)
                        if (exitcode==0):
@@ -2715,7 +2722,7 @@ if myaction in ["sync","rsync","metadata"] and (not "--help" in myopts):
                        retries=retries+1
 
                        if retries<=maxretries:
-                               print ">>> retry ..."
+                               print ">>> Retrying..."
                                time.sleep(11)
                        else:
                                # over retries
@@ -2756,7 +2763,7 @@ if myaction in ["sync","rsync","metadata"] and (not "--help" in myopts):
                cvsdir=os.path.dirname(myportdir)
                if not os.path.exists(myportdir+"/CVS"):
                        #initial checkout
-                       print ">>> starting initial cvs checkout with "+syncuri+"..."
+                       print ">>> Starting initial cvs checkout with "+syncuri+"..."
                        if not portage.spawn("cd "+cvsdir+"; cvs -d "+cvsroot+" login",portage.settings,free=1):
                                print "!!! cvs login error; exiting."
                                sys.exit(1)
@@ -2771,7 +2778,7 @@ if myaction in ["sync","rsync","metadata"] and (not "--help" in myopts):
                        sys.exit(0)
                else:
                        #cvs update
-                       print ">>> starting cvs update with "+syncuri+"..."
+                       print ">>> Starting cvs update with "+syncuri+"..."
                        sys.exit(portage.spawn("cd "+myportdir+"; cvs -z0 -q update -dP",portage.settings,free=1))
        else:
                print "!!! rsync setting: ",syncuri,"not recognized; exiting."
@@ -2902,7 +2909,8 @@ if myaction in ["sync","rsync","metadata"] and (not "--help" in myopts):
                print
                print red(" * ")+bold("An update to portage is available.")+" It is _highly_ recommended"
                print red(" * ")+"that you update portage now, before any other packages are updated."
-               print red(" * ")+"Please do so and then update "+bold("ALL")+" of your configuration files."
+               print red(" * ")+"Please run 'emerge portage' and then update "+bold("ALL")+" of your"
+               print red(" * ")+"configuration files."
                print
 elif myaction=="regen":
        emergelog(" === regen")
@@ -3135,7 +3143,9 @@ elif "depclean"==myaction:
                print "\n!!! Proceeding will break your installation.\n"
                countdown(EMERGE_WARNING_DELAY, ">>> Depclean")
 
-       emergelog(" >>> depclean")
+       if not "--pretend" in myopts: #just check pretend, since --ask implies pretend
+               emergelog(" >>> depclean")
+       
        mydepgraph=depgraph(myaction,myopts)
 
        if not ("--quiet" in myopts):
@@ -3144,7 +3154,7 @@ elif "depclean"==myaction:
                print "\n!!! Failed to create deptree."
                sys.exit(1)
        if not ("--quiet" in myopts):
-               print "\b\b ... done!"
+               print "\b\b... done!"
 
        if ("--usepkgonly" in myopts) and mydepgraph.missingbins:
                sys.stderr.write(red("The following binaries are not available for merging...\n"))
@@ -3219,14 +3229,19 @@ elif "depclean"==myaction:
 else:
        favorites=[]
        syslist=getlist("system")
-       if ((("--pretend" in myopts) and not ("--fetchonly" in myopts or "--fetch-all-uri" in myopts)) or ("--ask" in myopts)) and not ("--quiet" in myopts):
-               if "--tree" in myopts:
+       if ("--ask" in myopts or "--pretend" in myopts) and not "--quiet" in myopts:
+               action = ""
+               if "--fetchonly" in myopts or "--fetch-all-uri" in myopts:
+                       action = "fetched"
+               else:
+                       action = "merged"
+               if "--tree" in myopts and action != "fetched": # Tree doesn't work with fetching
                        print
-                       print darkgreen("These are the packages that I would merge, in reverse order:")
+                       print darkgreen("These are the packages that would be %s, in reverse order:") % action
                        print
                else:
                        print
-                       print darkgreen("These are the packages that I would merge, in order:")
+                       print darkgreen("These are the packages that would be %s, in order:") % action
                        print
 
        if ("--resume" in myopts) and portage.mtimedb.has_key("resume"):
@@ -3258,7 +3273,7 @@ else:
                                print "!!! Depgraph creation failed."
                                sys.exit(1)
                        if not ("--quiet" in myopts):
-                               print "\b\b ...done!"
+                               print "\b\b... done!"
                else:
                        if not myfiles:
                                print "emerge: please tell me what to do."
@@ -3272,7 +3287,7 @@ else:
                        if not retval:
                                sys.exit(1)
                        if not ("--quiet" in myopts):
-                               print "\b\b ...done!"
+                               print "\b\b... done!"
 
                        if ("--usepkgonly" in myopts) and mydepgraph.missingbins:
                                sys.stderr.write(red("The following binaries are not available for merging...\n"))
@@ -3296,7 +3311,7 @@ else:
                                #check for blocking dependencies
                                if x[0]=="blocks" and "--fetchonly" not in myopts and "--fetch-all-uri" not in myopts:
                                        print "\n!!! Error: The above package list contains packages which cannot be installed"
-                                       print   "!!!        on the same system."
+                                       print   "!!!        at the same time on the same system."
                                        print
                                        sys.exit(1)
                        if mergecount==0:
@@ -3357,6 +3372,6 @@ else:
                if portage.mtimedb.has_key("resume"):
                        del portage.mtimedb["resume"]
                if portage.settings["AUTOCLEAN"] and "yes"==portage.settings["AUTOCLEAN"]:
-                       print ">>> Auto-cleaning packages ..."
+                       print ">>> Auto-cleaning packages..."
                        unmerge("clean", ["world"])
        post_emerge()
index c3f291b8780b18504338590aa2f406e2f6431d2c..e035fec3cac98db80051d223ef4ef1eb7e884b8a 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newbin,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-dobin "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec dobin "${T}/${2}"
index dcb57ce7a4f459fc5e8ca50d12e22bb62c9218dd..5b04002aecf361166d2c182b6af67a8a609794b2 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newconfd,v 1.2 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doconfd "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doconfd "${T}/${2}"
index 38d5424feb3c07ea3a0eab6f3c8b5581d4dd48bd..37bdca157d68108fed9cf25298a3a7d6cb00b3f6 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newdoc,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-dodoc "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec dodoc "${T}/${2}"
index 452add10941420aa83246cddf64762ba4039962d..54a58f8708e570dd9a17970d4bb6f6a638687496 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newenvd,v 1.2 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doenvd "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doenvd "${T}/${2}"
index f4ddf67d41a472a832fa6b528bc7df4739afd0cf..aef2d81450047061de64318cc86c21ed20f0b1cd 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newexe,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doexe "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doexe "${T}/${2}"
index 62de7b075b3ec3b37a1dcb57dc0ab31f49b0c394..92cce843b0b67e00bb9dfd19b007021a9d16eca6 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newinitd,v 1.2 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doinitd "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doinitd "${T}/${2}"
index 72c084ea35ed121f374a4a722e74055a622bfb69..2824c6315a8472ff56a3bc4b546b0d02b63620a7 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newins,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Error: Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doins "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doins "${T}/${2}"
index 7f9d80d5819039240f162f9e1568092c65414ddd..973c504a68fb18c82ff53e584c21abd7b35c177e 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newlib.a,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Error: Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-dolib.a "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec dolib.a "${T}/${2}"
index 1aa6747fbd0cf5263e1b867bc5d0ac67811eca74..2c1e1ed4a2f6adee4a4a7b76ea2757753cc88192 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newlib.so,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Error: Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-dolib.so "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec dolib.so "${T}/${2}"
index ce817a622dddaf6b566b54991edec22d3a99d16d..76ef9a83f81b7f3bfc3683f9ff545517f90f5c9b 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newman,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-doman "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec doman "${T}/${2}"
index 985a623306b906a0ef03bef6a677fd39e3e2d6a1..2cd42065a160718b53018843c525f0523fc6590e 100755 (executable)
@@ -3,11 +3,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/newsbin,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-if [ -z "${T}" ] || [ -z "${2}" ] ; then
-       echo "Nothing defined to do."
+if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
+       echo "$0: Need two arguments, old file and new file" 1>&2
        exit 1
 fi
 
-rm -rf "${T}/${2}"
-cp "${1}" "${T}/${2}"
-dosbin "${T}/${2}"
+rm -rf "${T}/${2}" && \
+cp -f "${1}" "${T}/${2}" && \
+exec dosbin "${T}/${2}"
index 379dd1636d6d848aa9b4903e2407e7b77f90e1bc..647af12702f40e90f0d6e99c210adbeb25c4de3e 100644 (file)
@@ -21,12 +21,17 @@ cp_opts="-i"
 pager="less"
 #pager=""
 
+# For emacs-users
+# diff_command="eval emacs -nw --eval=\(ediff\ \"%file1\"\ \"%file2\"\)"
+#using_editor=1
+
 # vim-users: you CAN use vimdiff for diff_command. (see NOTE_1)
-diff_command="diff -uN %file1 %file2"
-using_editor=0
 #diff_command="vim -d %file1 %file2"
 #using_editor=1
 
+diff_command="diff -uN %file1 %file2"
+using_editor=0
+
 
 # vim-users: don't use vimdiff for merging (see NOTE_1)
 merge_command="sdiff -s -o %merged %orig %new"
@@ -68,4 +73,3 @@ merge_command="sdiff -s -o %merged %orig %new"
 # choose while using those programs)
 
 # NOTE_2: Make sure pager is set to "" when using an editor as diff_command!
-
index f12209525f921f08a18566bea17734d4b7826a7d..64e9d85c146b2efec4a9c58690c4d010c6993e3d 100644 (file)
@@ -1721,12 +1721,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                pass
        else:
                if try_mirrors:
-                       for x in mysettings["GENTOO_MIRRORS"].split():
-                               if x:
-                                       if x[-1] == '/':
-                                               mymirrors += [x[:-1]]
-                                       else:
-                                               mymirrors += [x]
+                       mymirrors += [x.rstrip("/") for x in mysettings["GENTOO_MIRRORS"].split() if x]
 
        mydigests = {}
        digestfn  = mysettings["FILESDIR"]+"/digest-"+mysettings["PF"]
@@ -2140,7 +2135,7 @@ def digestgen(myarchives,mysettings,overwrite=1,manifestonly=0):
                if (not overwrite) and os.path.exists(digestfn):
                        return 1
 
-               print green(">>> Generating digest file...")
+               print green(">>> Generating the digest file...")
 
                # Track the old digest so we can assume checksums without requiring
                # all files to be downloaded. 'Assuming'
@@ -2176,7 +2171,7 @@ def digestgen(myarchives,mysettings,overwrite=1,manifestonly=0):
                except Exception,e:
                        print e
 
-       print green(">>> Generating manifest file...")
+       print green(">>> Generating the manifest file...")
        mypfiles=listdir(pbasedir,recursive=1,filesonly=1,ignorecvs=1,EmptyOnError=1)
        mypfiles=cvstree.apply_cvsignore_filter(mypfiles)
        mypfiles.sort()
@@ -4096,7 +4091,6 @@ class dbapi:
                if mycpv:
                        mysplit = pkgsplit(mycpv)
                        for x in self.match(mysplit[0],use_cache=0):
-                               # fixed bug #41062
                                if x==mycpv:
                                        continue
                                try:
@@ -6080,7 +6074,7 @@ class dblink:
                self.dbdir = self.dbpkgdir
                self.unmerge(oldcontents,trimworld=0)
                self.dbdir = self.dbtmpdir
-               writemsg_stdout(">>> original instance of package unmerged safely.\n")
+               writemsg_stdout(">>> Original instance of package unmerged safely.\n")
 
                # We hold both directory locks.
                self.dbdir = self.dbpkgdir
@@ -6384,7 +6378,7 @@ class dblink:
                                        zing="---"
                                if self.settings["USERLAND"] == "Darwin" and myrealdest[-2:] == ".a":
 
-                                       # XXX kludge, bug #58848; can be killed when portage stops relying on
+                                       # XXX kludge, can be killed when portage stops relying on
                                        # md5+mtime, and uses refcounts
                                        # alright, we've fooled w/ mtime on the file; this pisses off static archives
                                        # basically internal mtime != file's mtime, so the linker (falsely) thinks
@@ -6522,7 +6516,7 @@ def pkgmerge(mytbz2,myroot,mysettings):
                shutil.rmtree(tmploc+"/"+mypkg,1)
        os.makedirs(pkgloc)
        os.makedirs(infloc)
-       writemsg_stdout(">>> extracting info\n")
+       writemsg_stdout(">>> Extracting info\n")
        xptbz2.unpackinfo(infloc)
        # run pkg_setup early, so we can bail out early
        # (before extracting binaries) if there's a problem
@@ -6531,10 +6525,10 @@ def pkgmerge(mytbz2,myroot,mysettings):
 
        mysettings.configdict["pkg"]["CATEGORY"] = mycat;
        a=doebuild(myebuild,"setup",myroot,mysettings,tree="bintree")
-       writemsg_stdout(">>> extracting %s\n" % mypkg)
+       writemsg_stdout(">>> Extracting %s\n" % mypkg)
        notok=spawn("bzip2 -dqc -- '"+mytbz2+"' | tar xpf -",mysettings,free=1)
        if notok:
-               print "!!! Error extracting",mytbz2
+               print "!!! Error Extracting",mytbz2
                cleanup_pkgmerge(mypkg,origdir)
                return None