From: Kito Date: Wed, 1 Feb 2006 17:44:20 +0000 (-0000) Subject: Merge with trunk - 2584:2616 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=7c8f4b4648b71b4fbee2bf687f63a56040c0bd07;p=portage.git Merge with trunk - 2584:2616 svn path=/main/branches/prefix/; revision=2617 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c6c99e95d..29dbd6f48 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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. diff --git a/bin/ebuild.sh b/bin/ebuild.sh index a7456fdac..2f649acd4 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -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} diff --git a/bin/emaint b/bin/emaint index 3c8db1acf..d9dcf6c2b 100755 --- a/bin/emaint +++ b/bin/emaint @@ -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() diff --git a/bin/emerge b/bin/emerge index 3059da79c..9a943ca67 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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: diff --git a/bin/env-update b/bin/env-update index 938373e49..4c3531828 100755 --- a/bin/env-update +++ b/bin/env-update @@ -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" diff --git a/bin/prepstrip b/bin/prepstrip index 3fcf7a9d7..ec4400d33 100755 --- a/bin/prepstrip +++ b/bin/prepstrip @@ -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 diff --git a/bin/repoman b/bin/repoman index bccf8320f..d47e18f7b 100755 --- a/bin/repoman +++ b/bin/repoman @@ -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.") diff --git a/cnf/make.conf b/cnf/make.conf index fb2cad1e8..9c23f09d0 100644 --- a/cnf/make.conf +++ b/cnf/make.conf @@ -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 diff --git a/cnf/make.conf.alpha b/cnf/make.conf.alpha index 32cba977c..b08342ba2 100644 --- a/cnf/make.conf.alpha +++ b/cnf/make.conf.alpha @@ -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 diff --git a/cnf/make.conf.amd64 b/cnf/make.conf.amd64 index f2de1cef3..caff3c59e 100644 --- a/cnf/make.conf.amd64 +++ b/cnf/make.conf.amd64 @@ -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 diff --git a/cnf/make.conf.arm b/cnf/make.conf.arm index 3f07565c2..34ca3990a 100644 --- a/cnf/make.conf.arm +++ b/cnf/make.conf.arm @@ -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 diff --git a/cnf/make.conf.hppa b/cnf/make.conf.hppa index 6f948642a..9241bcc3b 100644 --- a/cnf/make.conf.hppa +++ b/cnf/make.conf.hppa @@ -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 diff --git a/cnf/make.conf.ia64 b/cnf/make.conf.ia64 index 81f6a29a8..7de834833 100644 --- a/cnf/make.conf.ia64 +++ b/cnf/make.conf.ia64 @@ -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 diff --git a/cnf/make.conf.mips b/cnf/make.conf.mips index d63369da6..c0834b019 100644 --- a/cnf/make.conf.mips +++ b/cnf/make.conf.mips @@ -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 diff --git a/cnf/make.conf.ppc b/cnf/make.conf.ppc index d15bc999e..922536f6d 100644 --- a/cnf/make.conf.ppc +++ b/cnf/make.conf.ppc @@ -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 diff --git a/cnf/make.conf.ppc64 b/cnf/make.conf.ppc64 index 35becf4ec..2da0e6049 100644 --- a/cnf/make.conf.ppc64 +++ b/cnf/make.conf.ppc64 @@ -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 diff --git a/cnf/make.conf.s390 b/cnf/make.conf.s390 index fca5c058f..ad8097d2e 100644 --- a/cnf/make.conf.s390 +++ b/cnf/make.conf.s390 @@ -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 diff --git a/cnf/make.conf.sparc b/cnf/make.conf.sparc index b91446bf6..e1ab499d6 100644 --- a/cnf/make.conf.sparc +++ b/cnf/make.conf.sparc @@ -223,6 +223,12 @@ # 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 diff --git a/cnf/make.conf.x86 b/cnf/make.conf.x86 index 4c769dbf7..d98231eda 100644 --- a/cnf/make.conf.x86 +++ b/cnf/make.conf.x86 @@ -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 diff --git a/cnf/make.conf.x86-fbsd b/cnf/make.conf.x86-fbsd index 115aca554..1149e4161 100644 --- a/cnf/make.conf.x86-fbsd +++ b/cnf/make.conf.x86-fbsd @@ -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 diff --git a/man/emerge.1 b/man/emerge.1 index 66a626e03..97532c59e 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -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 \-.ebuild package\fR or \fBemerge \-\-buildpkg [category/]\fR or \fBquickpkg /var/db/pkg//\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 \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 diff --git a/man/make.conf.5 b/man/make.conf.5 index a914848c9..f955d2b8e 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -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. diff --git a/man/portage.5 b/man/portage.5 index ab1fc0318..b53532445 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -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 >> 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: diff --git a/pym/portage_dep.py b/pym/portage_dep.py index 99c00d041..dc0ee4d14 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -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.