# 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}
# 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
# 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}}"
# 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
# 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}"
# 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
# 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}
# $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
# 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"
}
# 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}"
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:
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:
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:
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):
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")
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
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():
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):
retries=retries+1
if retries<=maxretries:
- print ">>> retry ..."
+ print ">>> Retrying..."
time.sleep(11)
else:
# over retries
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)
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."
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")
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):
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"))
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"):
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."
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"))
#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:
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()
# 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}"
# 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}"
# 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}"
# 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}"
# 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}"
# 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}"
# 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}"
# 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}"
# 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}"
# 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}"
# 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}"
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"
# choose while using those programs)
# NOTE_2: Make sure pager is set to "" when using an editor as diff_command!
-
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"]
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'
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()
if mycpv:
mysplit = pkgsplit(mycpv)
for x in self.match(mysplit[0],use_cache=0):
- # fixed bug #41062
if x==mycpv:
continue
try:
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
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
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
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