* 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.
# 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="" ;;
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
}
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}
#!@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():
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()
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()
"sync", "system", "unmerge", "world",
]
options=[
-"--ask",
+"--ask", "--alphabetical",
"--buildpkg", "--buildpkgonly",
"--changelog", "--columns", "--cols",
"--debug", "--deep",
# 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]!="-":
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"]:
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:
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:
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:
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"))
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:
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"
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
[[ ${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
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):
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",
"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()
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.
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:
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:
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)
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={}
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=[]
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
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
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.")
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
.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
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
<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
.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
.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.
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
\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)
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
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
\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
.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
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.
.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
# 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
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"
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):
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'
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")
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:
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.