Merge with trunk - 2584:2616
authorKito <kito@gentoo.org>
Wed, 1 Feb 2006 17:44:20 +0000 (17:44 -0000)
committerKito <kito@gentoo.org>
Wed, 1 Feb 2006 17:44:20 +0000 (17:44 -0000)
svn path=/main/branches/prefix/; revision=2617

26 files changed:
RELEASE-NOTES
bin/ebuild.sh
bin/emaint
bin/emerge
bin/env-update
bin/prepstrip
bin/repoman
cnf/make.conf
cnf/make.conf.alpha
cnf/make.conf.amd64
cnf/make.conf.arm
cnf/make.conf.hppa
cnf/make.conf.ia64
cnf/make.conf.mips
cnf/make.conf.ppc
cnf/make.conf.ppc64
cnf/make.conf.s390
cnf/make.conf.sparc
cnf/make.conf.x86
cnf/make.conf.x86-fbsd
man/emerge.1
man/make.conf.5
man/portage.5
pym/emergehelp.py
pym/portage.py
pym/portage_dep.py

index c6c99e95db95264ee56ae2e7f55a2d0931fad267..29dbd6f48f85e099d81bb93d4d0a886fa1ba5ac9 100644 (file)
@@ -6,3 +6,6 @@ portage-2.1
 
 * new cache framework, breaking all old cache modules.
   If you're having problems with portage_db_cdb, this is likely the cause.
+* USE flag output ordering has changed.  The old ordering is now an option
+  by the name of --alphabetical.  Adding the option to EMERGE_DEFAULT_OPTS
+  in make.conf will restore the old behaviour permanently.
index a7456fdac2a74145fc1a702f3eed18751f0491be..2f649acd42b29934999894ba3a8b848323358d1a 100755 (executable)
@@ -1249,7 +1249,7 @@ dyn_install() {
                # are supported at the moment.  Keep this list in sync with
                # http://hardened.gentoo.org/gnu-stack.xml (Arch Status)
                case ${CTARGET:-${CHOST}} in
-                       i?86*|ia64*|s390*|x86_64*)
+                       i?86*|ia64*|m68k*|s390*|x86_64*)
                                f=$(scanelf -qyRF '%e %p' "${D}") ;;
                        *)
                                f="" ;;
@@ -1466,20 +1466,19 @@ dyn_preinst() {
        fi
 
        # SELinux file labeling (needs to always be last in dyn_preinst)
-       if useq selinux; then
+       if hasq selinux ${FEATURES} ; then
                # only attempt to label if setfiles is executable
                # and 'context' is available on selinuxfs.
-               if [ -f /selinux/context -a -x ${PREFIX}/usr/sbin/setfiles ]; then
+               if [ -f /selinux/context -a -x ${PREFIX}/usr/sbin/setfiles -a -x ${PREFIX}/usr/sbin/selinuxconfig ]; then
                        echo ">>> Setting SELinux security labels"
-                       if [ -f ${POLICYDIR}/file_contexts/file_contexts ]; then
-                               cp -f "${POLICYDIR}/file_contexts/file_contexts" "${T}"
-                       else
-                               make -C "${POLICYDIR}" FC=${T}/file_contexts "${T}/file_contexts"
-                       fi
+                       (
+                               eval "$(${PREFIX}/usr/sbin/selinuxconfig)" || \
+                                       die "Failed to determine SELinux policy paths.";
+
+                               addwrite /selinux/context;
 
-                       addwrite /selinux/context
-                       ${PREFIX}/usr/sbin/setfiles -r "${IMAGE}" "${T}/file_contexts" "${IMAGE}" \
-                               || die "Failed to set SELinux security labels."
+                               ${PREFIX}/usr/sbin/setfiles "${file_contexts_path}" -r "${IMAGE}" "${IMAGE}";
+                       ) || die "Failed to set SELinux security labels."
                else
                        # nonfatal, since merging can happen outside a SE kernel
                        # like during a recovery situation
@@ -1493,7 +1492,7 @@ dyn_preinst() {
 }
 
 dyn_spec() {
-       tar czf "/usr/src/redhat/SOURCES/${PF}.tar.gz" "${O}/${PF}.ebuild" "${O}/files" || die "Failed to create base rpm tarball."
+       tar czf "${PREFIX}/usr/src/redhat/SOURCES/${PF}.tar.gz" "${O}/${PF}.ebuild" "${O}/files" || die "Failed to create base rpm tarball."
 
        cat <<__END1__ > ${PF}.spec
 Summary: ${DESCRIPTION}
index 3c8db1acfd6c65069690e6d45c67f8a393a42e7c..d9dcf6c2b83699f17a8109858aab81cd174e190a 100755 (executable)
@@ -1,13 +1,11 @@
 #!@PYTHON@ -O
-
 import sys
 sys.path.insert(0, "@PORTAGE_BASE@/pym")
+
+import os, portage, portage_const, re
 from copy import copy
 from optparse import OptionParser, OptionValueError
 
-import re
-
-import os, portage, portage_const
 class WorldHandler(object):
 
        def name():
@@ -108,8 +106,9 @@ class VdbKeyHandler(object):
                return errors
 
 # this sucks, should track this in a different manner.
-modules = {"world" : WorldHandler,
-                  "vdbkeys": VdbKeyHandler}
+#modules = {"world" : WorldHandler,
+#                 "vdbkeys": VdbKeyHandler}
+modules = {"world" : WorldHandler}
 
 module_names = modules.keys()
 module_names.sort()
index 3059da79ccf79118fdd815f28c541a979d59a994..9a943ca67b0839774bfedbcedbec849f2224b8ea 100755 (executable)
@@ -72,9 +72,6 @@ update_spinner = update_twirl_spinner
 if "candy" in portage.settings.features:
        spinner = spinner_msgs[int(time.time()*100)%len(spinner_msgs)]
        update_spinner = update_scroll_spinner
-if not sys.stdout.isatty() or ("--nospinner" in sys.argv):
-       update_spinner = update_basic_spinner
-
 
 if (not sys.stdout.isatty()) or (portage.settings["NOCOLOR"] in ["yes","true"]):
        nocolor()
@@ -170,7 +167,7 @@ actions=[
 "sync",  "system", "unmerge",  "world",
 ]
 options=[
-"--ask",
+"--ask",          "--alphabetical",
 "--buildpkg",     "--buildpkgonly",
 "--changelog",    "--columns", "--cols",
 "--debug",        "--deep",
@@ -222,7 +219,7 @@ edebug=0
 
 # process short actions
 tmpcmdline=sys.argv[1:]
-#tmpcmdline.extend(portage.settings["EMERGE_OPTS"].split())
+tmpcmdline.extend(portage.settings["EMERGE_DEFAULT_OPTS"].split())
 cmdline=[]
 for x in tmpcmdline:
        if x[0:1]=="-" and x[1:2]!="-":
@@ -431,6 +428,9 @@ if ("--resume" in myopts):
 if ("--nocolor" in myopts) and (sys.stdout.isatty()):
        nocolor()
 
+if not sys.stdout.isatty() or ("--nospinner" in myopts):
+       update_spinner = update_basic_spinner
+
 CLEAN_DELAY = 5
 EMERGE_WARNING_DELAY = 10
 if portage.settings["CLEAN_DELAY"]:
@@ -1279,7 +1279,7 @@ class depgraph:
                                        else:
                                                xinfo='"'+arg+'"'
                                        if myparent:
-                                               xfrom = '(dependency required by '+green('"'+myparent.split()[2]+'"')+red(' ['+myparent.split()[0]+"])")
+                                               xfrom = '(dependency required by '+green('"'+myparent.split()[2]+'"')+red(' ['+myparent.split()[0]+"]")+')'
                                        alleb=portage.portdb.xmatch("match-all",x)
                                        if alleb:
                                                if "--usepkgonly" not in myopts:
@@ -1497,9 +1497,13 @@ class depgraph:
                        def create_use_string(*args):
                                return ""
                else:
-                       def create_use_string(name, cur_iuse, cur_use, old_iuse, old_use, is_new, all_flags=("--verbose" in myopts)):
+                       def create_use_string(name, cur_iuse, cur_use, old_iuse, old_use, is_new,
+                                       all_flags=("--verbose" in myopts), alphabetical=("--alphabetical" in myopts)):
                                enabled = []
-                               disabled = []
+                               if alphabetical:
+                                       disabled = enabled
+                               else:
+                                       disabled = []
                                for flag in cur_iuse:
                                        if flag in cur_use:
                                                if is_new or flag in old_use and all_flags:
@@ -1517,7 +1521,10 @@ class depgraph:
                                                        disabled.append(green("-"+flag)+"*")
 
                                enabled = " ".join(enabled)
-                               disabled = " ".join(disabled)
+                               if alphabetical:
+                                       disabled = ""
+                               else:
+                                       disabled = " ".join(disabled)
                                if enabled and disabled:
                                        ret = enabled + " " + disabled
                                elif enabled:
@@ -3028,7 +3035,7 @@ elif "info"==myaction:
                myvars = ['GENTOO_MIRRORS', 'CONFIG_PROTECT', 'CONFIG_PROTECT_MASK',
                          'PORTDIR', 'DISTDIR', 'PKGDIR', 'PORTAGE_TMPDIR',
                          'PORTDIR_OVERLAY', 'PREFIX', 'USE', 'CHOST', 'CFLAGS', 'CXXFLAGS',
-                         'ACCEPT_KEYWORDS', 'SYNC', 'FEATURES']
+                         'ACCEPT_KEYWORDS', 'SYNC', 'FEATURES', 'EMERGE_DEFAULT_OPTS']
 
                myvars.extend(portage_util.grabfile(portage.settings["PORTDIR"]+"/profiles/info_vars"))
 
@@ -3315,7 +3322,8 @@ else:
 
        if ("--pretend" in myopts) and not ("--fetchonly" in myopts or "--fetch-all-uri" in myopts):
                if ("--resume" in myopts):
-                       mydepgraph.display(portage.mtimedb["resume"]["mergelist"])
+                       ### Cut off the first element, since we aren't merging it #121106
+                       mydepgraph.display(portage.mtimedb["resume"]["mergelist"][1:])
                else:
                        mydepgraph.display(mydepgraph.altlist())
        else:
index 938373e4900f8de21e25c125ef165dbd4d62ed0e..4c353182842778388795d4c239a5d75cb5e4684d 100755 (executable)
@@ -17,6 +17,9 @@ if "-h" in sys.argv or "--help" in sys.argv:
        usage(0)
 
 makelinks=1
+if "--no-ldconfig" in sys.argv:
+       makelinks=0
+       sys.argv.pop(sys.argv.index("--no-ldconfig"))
 
 if len(sys.argv) > 1:
        print "!!! Invalid command line options!\n"
index 3fcf7a9d75ebed643c048e7726761cded51263d7..ec4400d339cb2b4a4738ea964d78e622d4d3d6b2 100755 (executable)
@@ -21,7 +21,7 @@ banner=1
 
 save_elf_debug() {
        local x=$1
-       local y="${D}/usr/lib/debug/${x:${#D}:${#x}}"
+       local y="${D}/usr/lib/debug/${x:${#D}:${#x}}.debug"
 
        [[ " ${FEATURES} " != *" splitdebug "* ]] && return 0
 
@@ -29,8 +29,9 @@ save_elf_debug() {
        [[ ${x:7} == ".debug" ]] && return 0
 
        mkdir -p $(dirname "${y}")
-       ${OBJCOPY} --only-keep-debug ${x} ${y}.debug
-       ${OBJCOPY} --add-gnu-debuglink=${y}.debug ${x}
+       ${OBJCOPY} --only-keep-debug "${x}" "${y}"
+       ${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
+       chmod a-x "${y}"
 
        [[ " ${FEATURES} " != *" installsources "* ]] && return 0
 
index bccf8320f0f24cf16313c35237df9fd68770d571..d47e18f7b8eaece61c95ec27b6e81b290cdc2892 100755 (executable)
@@ -40,8 +40,14 @@ from grp import getgrnam
 from stat import *
 
 
-def err(txt):
+def warn(txt):
        print exename+": "+txt
+def err(txt):
+       warn(txt)
+       sys.exit(1)
+def err_help(txt):
+       help(exitstatus=-1,helpfulness=0)
+       warn(txt)
        sys.exit(1)
 
 def exithandler(signum=None,frame=None):
@@ -51,29 +57,43 @@ def exithandler(signum=None,frame=None):
 signal.signal(signal.SIGINT,exithandler)
 
 REPOROOTS=["gentoo-x86"]
-modes=["scan","fix","full","help","commit","last","lfull"]
 shortmodes={"ci":"commit"}
 modeshelp={
-"scan"  :"Scan current directory tree for QA issues (default)",
-"fix"   :"Fix those issues that can be fixed (stray digests, missing digests)",
-"full"  :"Scan current directory tree for QA issues (full listing)",
-"help"  :"Show this screen",
-"commit":"Scan current directory tree for QA issues; if OK, commit via cvs",
-"last" :"Remember report from last run",
-"lfull"        :"Remember report from last run (full listing)"
+"scan"   : "Scan directory tree for QA issues (default)",
+"fix"    : "Fix simple QA issues (stray digests, missing digests)",
+"full"   : "Scan directory tree for QA issues (full listing)",
+"help"   : "Show this screen",
+"commit" : "Scan directory tree for QA issues; if OK, commit via cvs",
+"last"   : "Remember report from last run",
+"lfull"  : "Remember report from last run (full listing)"
+}
+modes=modeshelp.keys()
+repoman_options={
+"--commitmsg"      : "Adds a commit message via the command line",
+"--commitmsgfile"  : "Adds a commit message from the specified file",
+"--help"           : "Show this screen",
+"--ignore-arches"  : "Ignore arch-specific failures (where arch != host)",
+"--include-masked" : "Include masked packages in scans at category or tree level",
+"--pretend"        : "Don't commit or fix anything; just show what would be done",
+"--quiet"          : "Be less verbose about extraneous info",
+"--verbose"        : "Displays every package name while checking",
+"--version"        : "Show version info",
+"--xmlparse"       : "Forces the metadata.xml parse check to be carried out"
 }
-options=["--pretend","--help","--commitmsg","--commitmsgfile","--verbose","--xmlparse","--ignore-other-arches","--include-masked"]
-shortoptions={"-m":"--commitmsg","-M":"--commitmsgfile","-p":"--pretend","-v":"--verbose","-x":"--xmlparse","-I":"--ignore-other-arches"}
-optionshelp={
-"--pretend":"Don't actually perform commit or fix steps; just show what would be done (always enabled when not started in a CVS tree).",
-"--help"   :"Show this screen",
-"--commitmsg"    :"Adds a commit message via the command line.",
-"--commitmsgfile":"Adds a commit message from a file given on the command line.",
-"--ignore-other-arches": "Instructs repoman to ignore arches that are not relevent to the committing arch. REPORT/FIX issues you work around.",
-"--verbose":"Displays every package name while checking",
-"--xmlparse":"Forces the metadata.xml parse check to be carried out",
-"--include-masked":"Includes masked packages in scans at category or tree level"
+repoman_shortoptions={
+"-h" : "--help",
+"-i" : "--include-masked",
+"-I" : "--ignore-arches",
+"-m" : "--commitmsg",
+"-M" : "--commitmsgfile",
+"-p" : "--pretend",
+"-q" : "--quiet",
+"-v" : "--verbose",
+"-V" : "--version",
+"-x" : "--xmlparse"
 }
+repoman_shortoptions_rev=dict([(v,k) for (k,v) in repoman_shortoptions.items()])
+options=repoman_options.keys()
 
 qahelp={
        "CVS/Entries.IO_error":"Attempting to commit, and an IO error was encountered access the Entries file",
@@ -136,7 +156,8 @@ qahelp={
        "metadata.bad":"Bad metadata.xml files",
        "virtual.versioned":"PROVIDE contains virtuals with versions",
        "virtual.exists":"PROVIDE contains existing package names",
-       "virtual.unavailable":"PROVIDE contains a virtual which contains no profile default"
+       "virtual.unavailable":"PROVIDE contains a virtual which contains no profile default",
+       "usage.obsolete":"The ebuild makes use of an obsolete construct"
 }
 
 qacats = qahelp.keys()
@@ -196,6 +217,8 @@ valid_ebuild_name_re=re.compile(ven_string+'$', re.I)
 valid_ebuild_filename_re=re.compile(ven_string+'\.ebuild$', re.I)
 
 repoman_settings = portage.config(clone=portage.settings)
+verbose=0
+quiet=0
 
 def valid_ebuild_name(name):
        """(name) --- Checks to ensure that the package name meets portage specs.
@@ -210,31 +233,47 @@ def valid_ebuild_name(name):
        return 0
 
 
-def help():
-       print
-       print green(exename+" "+version)
-       print " \"Quality is job zero.\""
-       print " Copyright 1999-2006 Gentoo Foundation"
-       print " Distributed under the terms of the GNU General Public License v2"
+def show_version():
+       print exename+" "+version
+       sys.exit(0)
+def help(exitstatus=1,helpfulness=1):
+       if quiet:
+               helpfulness=0
+       if helpfulness:
+               print
+               print green(exename+" "+version)
+               print " \"Quality is job zero.\""
+               print " Copyright 1999-2006 Gentoo Foundation"
+               print " Distributed under the terms of the GNU General Public License v2"
+               print
+       print bold(" Usage:"),turquoise(exename),"[",green("options"),"] [",green("mode"),"]"
+       if helpfulness:
+               print bold(" Modes:"),turquoise("scan (default)"),
+               for x in modes[1:]:
+                       print "|",turquoise(x),
+               print
        print
-       print bold(" Usage:"),turquoise(exename),"[",green("option"),"] [",green("mode"),"]"
-       print bold(" Modes:"),turquoise("scan (default)"),
-       for x in modes[1:]:
-               print "|",turquoise(x),
-       print "\n"
-       print " "+green(string.ljust("Option",20)+" Description")
+       print " "+green(string.ljust("Options",20)+" Description")
        for x in options:
-               print " "+string.ljust(x,20),optionshelp[x]
+               if repoman_shortoptions_rev.has_key(x):
+                       shopt=repoman_shortoptions_rev[x]+", "+x
+               else:
+                       shopt="    "+x
+               print " "+string.ljust(shopt,20),repoman_options[x]
        print
-       print " "+green(string.ljust("Mode",20)+" Description")
+       print " "+green(string.ljust("Modes",20)+" Description")
        for x in modes:
                print " "+string.ljust(x,20),modeshelp[x]
-       print
-       print " "+green(string.ljust("QA keyword",20)+" Description")
-       for x in qacats:
-               print " "+string.ljust(x,20),qahelp[x]
-       print
-       sys.exit(1)
+       if helpfulness:
+               print
+               print " "+green(string.ljust("QA keyword",20)+" Description")
+               for x in qacats:
+                       print " "+string.ljust(x,20),qahelp[x]
+               print
+       if (exitstatus != -1):
+               sys.exit(exitstatus)
+       else:
+               print
 
 def last():
        try:
@@ -303,30 +342,36 @@ if len(sys.argv)>1:
        while x < len(sys.argv):
                if sys.argv[x] in shortmodes.keys():
                        sys.argv[x]=shortmodes[sys.argv[x]]
+               elif sys.argv[x] in repoman_shortoptions.keys():
+                       sys.argv[x] = repoman_shortoptions[sys.argv[x]]
                if sys.argv[x] in modes:
                        if mymode==None:
                                mymode=sys.argv[x]
                        else:
                                err("Please specify either \""+mymode+"\" or \""+sys.argv[x]+"\", but not both.")
-               elif sys.argv[x] in options+shortoptions.keys():
+               elif sys.argv[x] in options:
                        optionx=sys.argv[x]
-                       if optionx in shortoptions.keys():
-                               optionx = shortoptions[optionx]
                        if (optionx=="--commitmsg") and (len(sys.argv)>=(x+1)):
                                commitmessage=sys.argv[x+1]
                                x=x+1
                        elif (optionx=="--commitmsgfile") and (len(sys.argv)>=(x+1)):
                                commitmessagefile=sys.argv[x+1]
                                x=x+1
+                       elif (optionx=="--verbose"):
+                               verbose+=1
+                       elif (optionx=="--quiet"):
+                               quiet+=1
                        elif optionx not in myoptions:
                                myoptions.append(optionx)
                else:
-                       err("\""+sys.argv[x]+"\" is not a valid mode or option.")
+                       err_help("\""+sys.argv[x]+"\" is not a valid mode or option.")
                x=x+1
 if mymode==None:
        mymode="scan"
 if mymode=="help" or ("--help" in myoptions):
-       help()
+       help(exitstatus=0)
+if ("--version" in myoptions):
+       show_version()
 if mymode=="last" or (mymode=="lfull"):
        last()
 if mymode=="commit" and "--include-masked" not in myoptions:
@@ -445,9 +490,10 @@ if portdir_overlay != portdir:
 else:
        os.environ["PORTDIR_OVERLAY"] = ""
 
-print "\nSetting paths:"
-print "PORTDIR = \""+os.environ["PORTDIR"]+"\""
-print "PORTDIR_OVERLAY = \""+os.environ["PORTDIR_OVERLAY"]+"\""
+if quiet < 2:
+       print "\nSetting paths:"
+       print "PORTDIR = \""+os.environ["PORTDIR"]+"\""
+       print "PORTDIR_OVERLAY = \""+os.environ["PORTDIR_OVERLAY"]+"\""
 
 
 reload(portage)
@@ -489,11 +535,10 @@ os.chdir(startdir)
 
 def caterror(mycat):
        err(mycat+" is not an official category.  Skipping QA checks in this directory.\nPlease ensure that you add "+catdir+" to "+repodir+"/profiles/categories\nif it is a new category.")
-print
 if "--pretend" in myoptions:
-       print green("RepoMan does a once-over of the neighborhood...")
-else:
-       print green("RepoMan scours the neighborhood...")
+       print green("\nRepoMan does a once-over of the neighborhood...")
+elif quiet < 1:
+       print green("\nRepoMan scours the neighborhood...")
 
 # retreive local USE list
 luselist={}
@@ -660,10 +705,31 @@ else:
        xmllint_capable=True
 
 
+def x11_deprecation_check(depstr):
+       if depstr.find("virtual/x11") == -1:
+               return False
+       depsplit = depstr.split()
+       ok_stack = []
+       ok = False
+       for token in depsplit:
+               if token == "(":
+                       ok_stack.append(ok)
+                       ok = False
+               elif token == ")":
+                       ok = ok_stack.pop()
+               elif token == "||":
+                       ok = True
+               else:
+                       ok = False
+                       if token.find("virtual/x11") != -1 and (not ok_stack or not ok_stack[-1]):
+                               return True
+       return False
+
+
 arch_caches={}
 for x in scanlist:
        #ebuilds and digests added to cvs respectively.
-       if "--verbose" in myoptions:
+       if verbose:
                print "checking package " + x
        eadded=[]
        dadded=[]
@@ -1027,6 +1093,11 @@ for x in scanlist:
                badlicsyntax = badlicsyntax > 0
                badprovsyntax = badprovsyntax > 0
 
+               if not baddepsyntax:
+                       if x11_deprecation_check(" ".join([myaux["DEPEND"], myaux["RDEPEND"], myaux["PDEPEND"]])):
+                               stats["usage.obsolete"] += 1
+                               fails["usage.obsolete"].append("%s/%s.ebuild: not migrated to modular X" % (x, y))
+
                for keyword,arch,groups in arches:
                        portage.groups=groups
 
@@ -1254,7 +1325,8 @@ if not (os.stat('/var/cache/edb/repo.stats')[ST_GID] == getgrnam('portage')[2]):
 if not (os.stat('/var/cache/edb/repo.fails')[ST_GID] == getgrnam('portage')[2]):
        os.chown('/var/cache/edb/repo.fails',os.geteuid(),getgrnam('portage')[2])
        os.chmod('/var/cache/edb/repo.fails',0664)
-print
+if quiet < 2:
+       print
 #dofail will be set to 1 if we have failed in at least one non-warning category
 dofail=0
 #dowarn will be set to 1 if we tripped any warnings
@@ -1308,12 +1380,17 @@ def grouplist(mylist,seperator="/"):
 if mymode!="commit":
        if dofull:
                print bold("Note: type \"repoman full\" for a complete listing.")
-               print
+               if quiet < 1:
+                       print
        if dowarn and not dofail:
-               print green("RepoMan sez:"),"\"You're only giving me a partial QA payment?\n              I'll take it this time, but I'm not happy.\""
+               if quiet < 2:
+                       print green("RepoMan sez:"),"\"You're only giving me a partial QA payment?\n              I'll take it this time, but I'm not happy.\""
+               else:
+                       print green("RepoMan sez:"),"\"OK for now, but I'll be back ...\""
        elif not dofail:
                print green("RepoMan sez:"),"\"If everyone were like you, I'd be out of business!\""
-       print
+       if quiet < 1:
+               print
 else:
        if dofail:
                print turquoise("Please fix these important QA issues first.")
index fb2cad1e8768cb834a802a1b027a13b7d4978a5f..9c23f09d0d7ee43a7c4fb7912d3d1f762b85fdbe 100644 (file)
@@ -222,6 +222,12 @@ CHOST="i686-pc-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index 32cba977cb0228a094a9967f2ba0a9b315a2de52..b08342ba22e5ad616b1483657afaec28f4168e73 100644 (file)
@@ -208,6 +208,12 @@ CFLAGS="-mcpu=ev5 -O3 -pipe "
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index f2de1cef3bc0f247baf0a422b111ac98e40578eb..caff3c59e104a0680e397a5588e72008a46b5724 100644 (file)
@@ -219,6 +219,12 @@ CHOST="x86_64-pc-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index 3f07565c231ce7adfec87ceee8a84bda72d2e299..34ca3990a211f3856a4e69e7406cd2ea8485d107 100644 (file)
@@ -216,6 +216,12 @@ CHOST="armv4l-unknown-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index 6f948642a060ba1866f3eba6fefda8bda357f889..9241bcc3b2acc0db41c64e552f841503f8a96fce 100644 (file)
@@ -225,6 +225,12 @@ CHOST="hppa-unknown-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index 81f6a29a84864fdf4ec2939b80cd495540337547..7de834833ea0fb3b0da585c4081a08f0e35ce2a5 100644 (file)
@@ -187,6 +187,12 @@ CHOST="ia64-unknown-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index d63369da633d80d56b1eedc1345163c3b5b8b48c..c0834b0198f7a5545b6adf51fffeeeea14ad2220 100644 (file)
@@ -205,6 +205,12 @@ CHOST="mips-unknown-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index d15bc999eb50d23b5ca9a9b94af0788dc7921765..922536f6df8bf8100526dbf498191bacc47f3896 100644 (file)
@@ -245,6 +245,12 @@ CHOST="powerpc-unknown-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index 35becf4ec893352b71e276eec38db1c9e2577c9a..2da0e6049ab2fd1aa248f303a90af40b4498dc43 100644 (file)
@@ -229,6 +229,12 @@ CHOST="powerpc64-unknown-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index fca5c058f89b663290b55aac99fb4e893238cf9e..ad8097d2e93474bc8289fd6100a9411d575ece3d 100644 (file)
@@ -187,6 +187,12 @@ CHOST="s390-ibm-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index b91446bf66e46ade2ad9f3bf7dd235679aab87b0..e1ab499d6773f3a192e24cf1eaa065bb3e62cad2 100644 (file)
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index 4c769dbf70f3d1a25b5cdc90a19b4536c95f77a9..d98231edaf610fa1729c6a1e9947fb2a40956a08 100644 (file)
@@ -222,6 +222,12 @@ CHOST="i686-pc-linux-gnu"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index 115aca5545db61a28a42ac0b5f0e19d7fedf71ca..1149e41619fde1a4cf391aec19e8366119a31d47 100644 (file)
@@ -222,6 +222,12 @@ CHOST="i686-unknown-freebsd5.3"
 # Advanced Features
 # =================
 #
+# EMERGE_DEFAULT_OPTS allows emerge to act as if certain options are
+#     specified on every run. Useful options include --ask, --verbose,
+#     --usepkg and many others. Options that are not useful, such as --help,
+#     are not filtered.
+#EMERGE_DEFAULT_OPTS=""
+#
 # MAKEOPTS provides extra options that may be passed to 'make' when a
 #     program is compiled. Presently the only use is for specifying
 #     the number of parallel makes (-j) to perform. The suggested number
index 66a626e03983484ff9b49f40ca2d95beac5c626e..97532c59efe5c4c5dff35980e2339f2349c240d8 100644 (file)
@@ -4,7 +4,7 @@ emerge \- Command\-line interface to the Portage system
 .SH "SYNOPSIS"
 .TP
 .BR emerge
-[\fIoptions\fR] [\fIaction\fR] [\fIebuild\fR | \fItbz2file\fR | \fIclass\fR | \fIdependency\fR] ...
+[\fIoptions\fR] [\fIaction\fR] [\fIebuild\fR | \fItbz2file\fR | \fIset\fR | \fIdependency\fR] ...
 .TP
 .BR emerge
 \fB\-\-sync\fR | \fB\-\-info\fR | \fB\-\-version\fR
@@ -23,10 +23,10 @@ updated packages available.  \fBemerge\fR gracefully handles updating
 installed packages to newer releases as well.  It handles both source
 and binary packages, and it can be used to create binary packages for
 distribution.
-.SH "EBUILDS, TBZ2S, CLASSES AND DEPENDENCIES"
+.SH "EBUILDS, TBZ2S, SETS AND DEPENDENCIES"
 \fBemerge\fR primarily installs packages.  You can specify
 packages to install in one of four main ways: an \fIebuild\fR,
-a \fItbz2file\fR, a \fIclass\fR, or a \fIdependency\fR.
+a \fItbz2file\fR, a \fIset\fR, or a \fIdependency\fR.
 .LP
 .TP
 .BR ebuild
@@ -46,9 +46,9 @@ A \fItbz2file\fR must be a valid .tbz2 created with \fBebuild
 <package>\-<version>.ebuild package\fR or \fBemerge \-\-buildpkg 
 [category/]<package>\fR or \fBquickpkg /var/db/pkg/<category>/<package>\fR.
 .TP
-.BR class
-Package classes are a convenient shorthand for large groups of
-packages.  Two classes are currently supported: \fBsystem\fR
+.BR set
+Package sets are a convenient shorthand for large groups of
+packages.  Two sets are currently supported: \fBsystem\fR
 and \fBworld\fR.  \fBsystem\fR refers to a set of packages
 deemed necessary for your system to run properly.  \fBworld\fR
 contains all of the packages in \fBsystem\fR, along with any
@@ -70,7 +70,7 @@ to get around escaping problems.
 .BR "No action"
 If no action is specified, the action is to merge in the specified
 packages, satisfying any dependencies that they may have.  The
-arguments can be \fIebuilds\fR, \fItbz2s\fR, \fIclasses\fR, or
+arguments can be \fIebuilds\fR, \fItbz2s\fR, \fIsets\fR, or
 \fIdependencies\fR.  \fBNote that you need to use the \-\-usepkg 
 option if you want to install a tbz2\fR.  The packages are added
 to the \fBworld\fR file at the end, so that they are considered for
@@ -79,7 +79,7 @@ later updating.
 .BR "\-\-clean " (\fB\-c\fR)
 Cleans the system by removing packages that will not affect the
 functionality of the system.  The arguments can be \fIebuilds\fR,
-\fIclasses\fR, or \fIdependencies\fR.  For example, \fBemerge
+\fIsets\fR, or \fIdependencies\fR.  For example, \fBemerge
 clean binutils\fR cleans out old versions of binutils;
 \fBemerge \-\-clean net\-www/mozilla\-0.9.9\-r2\fR cleans out that
 specific version of Mozilla.  This is generally safe to use.
@@ -133,7 +133,7 @@ handle multiple versions of the same package properly, beware!  This does not
 check dependencies, so it may also remove packages necessary for the proper 
 operation of your system.  \fBUse\fR \-\-clean \fBinstead unless you really 
 know what you're doing\fR.  Its arguments can be \fIebuilds\fR, 
-\fIclasses\fR, or \fIdependencies\fR \-\- see \fB\-\-clean\fR above for 
+\fIsets\fR, or \fIdependencies\fR \-\- see \fB\-\-clean\fR above for 
 examples.  You have been warned!
 .TP
 .BR \-\-regen
@@ -177,7 +177,7 @@ description of PORTDIR_OVERLAY for a method to avoid deletions.
 \fBWARNING: This action can remove important packages!\fR Removes
 all matching packages.  This does no checking of dependencies, so
 it may remove packages necessary for the proper operation of your
-system.  Its arguments can be \fIebuilds\fR, \fIclasses\fR, or
+system.  Its arguments can be \fIebuilds\fR, \fIsets\fR, or
 \fIdependencies\fR \-\- see \fB\-\-clean\fR above for examples.
 .TP
 .BR "\-\-update " (\fB\-u\fR)
@@ -202,6 +202,10 @@ emerge  process  has completed.  This usually entails configuration
 file setup or other similar setups that the user  may  wish to run.
 .SH "OPTIONS"
 .TP
+.BR "\-\-alphabetical "
+When displaying USE and other flag output, combines the enabled and
+disabled lists into one list and sorts the whole list alphabetically.
+.TP
 .BR "\-\-ask " (\fB\-a\fR)
 Before performing the merge, display what ebuilds and tbz2s will be installed, 
 in the same format as when using \fB\-\-pretend\fR; then ask whether to 
@@ -440,7 +444,7 @@ displayed.
 You should almost always precede any package install or update attempt with a 
 \fB\-\-pretend\fR install or update.  This lets you see how much will be 
 done, and shows you any blocking packages that you will have to rectify.  
-This goes doubly so for the \fBsystem\fR and \fBworld\fR classes, which can 
+This goes doubly so for the \fBsystem\fR and \fBworld\fR sets, which can 
 update a large number of packages if the portage tree has been particularly 
 active.
 .LP
@@ -520,7 +524,7 @@ Marius Mauch <genone@gentoo.org>
 \fB/var/lib/portage/world\fR 
 Contains a list of all user\-specified packages.  You can safely edit
 this file, adding packages that you want to be considered in \fBworld\fR
-class updates and removing those that you do not want to be considered.
+set updates and removing those that you do not want to be considered.
 .TP
 \fB/etc/make.conf\fR 
 Contains variables for the build process, overriding those in
@@ -549,7 +553,7 @@ Contains a list of default packages used to resolve virtual dependencies.
 .TP
 \fB/etc/make.profile/packages\fR
 Contains a list of packages used for the base system.  The \fBsystem\fR
-and \fBworld\fR classes consult this file.  \fBDo not edit this file\fR.
+and \fBworld\fR sets consult this file.  \fBDo not edit this file\fR.
 .TP
 \fB/etc/make.globals\fR 
 Contains the default variables for the build process.  \fBDo not edit
index a914848c99d19b1a042ad415119757324160be3a..f955d2b8e1e1b02e4c534f62512cf9bd8c912e21 100644 (file)
@@ -98,6 +98,9 @@ Defaults to ${PORTDIR}/distfiles.
 Defines whether or not to ignore audible beeps when displaying important
 informational messages.  This variable is unset by default.
 .TP
+.B EMERGE_DEFAULT_OPTS
+Options to append to the end of the emerge command line on every invocation.
+.TP
 .B EPAUSE_IGNORE
 Defines whether or not to ignore short pauses that occur when displaying
 important informational messages.  This variable is unset by default.
index ab1fc03180b996e82a53b734fffdf23685351116..b53532445274eaeb815507f790982ece4a0b00d7 100644 (file)
@@ -162,13 +162,13 @@ Special USE flags used by catalyst for building a stage3 and GRP sets.
 .BR packages
 This file serves two purposes.  The first is to mask out specific 
 packages/versions on a per\-profile basis.  The second is to provide the 
-list of packages that compose the special \fIsystem\fR class.
+list of packages that compose the special \fIsystem\fR set.
 
 .I Format:
 .nf
 \- comments begin with #
 \- one DEPEND atom per line of what to mask OUT
-\- packages to be added to the system class begin with a *
+\- packages to be added to the system set begin with a *
 .fi
 .I Note:
 In a cascading profile setup, you can remove packages in children 
@@ -180,10 +180,10 @@ a '\-'.
 # i am a comment !
 # only allow versions of glibc less than 2.3
 <sys\-libs/glibc\-2.3
-# add any version of bash to the system class
+# add any version of bash to the system set
 *app\-shells/bash
 # only allow versions of readline earlier than 4.2
-# and add it to the system class
+# and add it to the system set
 *<sys\-libs/readline\-4.2
 .fi
 .TP
index 19b30a6c594e6a91ef18fbd7c33b89b365157f7b..9a80de50d24f66748fad48d1d8c472d791e4b11c 100644 (file)
@@ -119,6 +119,12 @@ def help(myaction,myopts,havecolor=1):
                print "              file setup or other similar setups that the user  may  wish to run."
                print
                print turquoise("Options:")
+               print "       "+green("--alphabetical")
+               print "              When displaying USE and other flag output, combines the enabled and"
+               print "              disabled lists into one list and sorts the whole list"
+               print "              alphabetically.  With this option, output such as USE=\"dar -bar"
+               print "              -foo\" will instead be displayed as USE=\"-bar dar -foo\""
+               print
                print "       "+green("--ask")+" ("+green("-a")+" short option)"
                print "              before performing the merge, display what ebuilds and tbz2s will"
                print "              be installed, in the same format as when using --pretend; then"
index 65e86825eed6039dcdd293f3020cdd140b7cc820..25ae6334ab6ca1a4ff5d34f2dbb5261cc86a8e69 100644 (file)
@@ -591,9 +591,6 @@ def env_update(makelinks=1):
                oldld=None
 
        ld_cache_update=False
-       if os.environ.has_key("PORTAGE_CALLER") and \
-          os.environ["PORTAGE_CALLER"] == "env-update":
-               ld_cache_update = True
 
        newld=specials["LDPATH"]
        if (oldld!=newld):
@@ -654,9 +651,10 @@ def env_update(makelinks=1):
                        mtimedb["ldpath"][x]=newldpathtime
                        ld_cache_update=True
 
-       # ldconfig has very different behaviour between FreeBSD and Linux
-       if ostype=="Linux" or ostype.lower().endswith("gnu"):
-               if (ld_cache_update or makelinks):
+       # Only run ldconfig as needed
+       if (ld_cache_update or makelinks):
+               # ldconfig has very different behaviour between FreeBSD and Linux
+               if ostype=="Linux" or ostype.lower().endswith("gnu"):
                        # We can't update links if we haven't cleaned other versions first, as
                        # an older package installed ON TOP of a newer version will cause ldconfig
                        # to overwrite the symlinks we just made. -X means no links. After 'clean'
@@ -666,8 +664,7 @@ def env_update(makelinks=1):
                                commands.getstatusoutput("cd / ; "+portage_const.PREFIX+"/sbin/ldconfig -r "+root)
                        else:
                                commands.getstatusoutput("cd / ; "+portage_const.PREFIX+"/sbin/ldconfig -X -r "+root)
-       elif ostype in ("FreeBSD","DragonFly"):
-               if (ld_cache_update):
+               elif ostype in ("FreeBSD","DragonFly"):
                        writemsg(">>> Regenerating "+str(root)+"var/run/ld-elf.so.hints...\n")
                        commands.getstatusoutput("cd / ; "+portage_const.PREFIX+"/sbin/ldconfig -elf -i -f "+str(root)+portage_const.PREFIX+"/var/run/ld-elf.so.hints "+str(root)+portage_const.PREFIX+"/etc/ld.so.conf")
                        commands.getstatusoutput("cd / ; /sbin/ldconfig -elf -i -f "+str(root)+"var/run/ld-elf.so.hints "+str(root)+"etc/ld.so.conf")
@@ -3168,6 +3165,11 @@ def dep_eval(deplist):
                                        return 1
                        elif x==1:
                                        return 1
+               #XXX: unless there's no available atoms in the list
+               #in which case we need to assume that everything is
+               #okay as some ebuilds are relying on an old bug.
+               if len(deplist) == 1:
+                       return 1
                return 0
        else:
                for x in deplist:
index 99c00d04194f68889ec304591caf38ee89f2f133..dc0ee4d1437fceddef24ce1077a4fbc18901b417 100644 (file)
@@ -87,7 +87,9 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]):
                        if additions:
                                rlist.append(additions)
                        elif rlist and rlist[-1] == "||":
-                               raise portage_exception.InvalidDependString("No default atom(s) in \""+paren_enclose(deparray)+"\"")
+                       #XXX: Currently some DEPEND strings have || lists without default atoms.
+                       #       raise portage_exception.InvalidDependString("No default atom(s) in \""+paren_enclose(deparray)+"\"")
+                               rlist.append([])
 
                else:
                        if head[-1] == "?": # Use reduce next group on fail.