portage-2.2
-------------
-* Allow per-module setting of PORTAGE_ELOG_CLASSES
* Namespace sanitizing: move all portage related code into portage.* namespace,
rename portage_foo modules to portage.foo (but keep symlinks for compability)
* Add license visibility filtering (GLEP 23)
-* Add new elog module "echo" to simply display messages when emerge exits
* Enable "echo" and "save_summary" elog modules by default
* Fix -* handling in package.keywords to work as intended (reset the accepted
keywords list), also see RELEASE-NOTES.
portage-2.1.3
-------------
+* Allow per-module setting of PORTAGE_ELOG_CLASSES
+* Add new elog module "echo" to simply display messages when emerge exits
* Add ** as new token for package.keywords to bypass the keyword visibility layer
* USE_EXPAND variables such as LINGUAS support a * wildcard that will enable
all of the corresponding flags that are listed in IUSE for a given package.
return os.EX_OK
if __name__ == "__main__":
- usage = "Usage: quickpkg [options] <list of package atoms>"
+ usage = "quickpkg [options] <list of package atoms>"
from optparse import OptionParser
parser = OptionParser(usage=usage)
parser.add_option("--umask",
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+# Rotate the log created by the save_summary elog module.
+
+/var/log/portage/elog/summary.log {
+ missingok
+}
.TP
\fBRESTRICT\fR = \fI[strip,mirror,fetch,userpriv]\fR
This should be a space delimited list of portage features to restrict.
+You may use conditional syntax to vary restrictions as seen above in DEPEND.
.PD 0
.RS
.TP
checks need to be skipped for other reasons (such as proprietary binaries),
see the \fBQA CONTROL VARIABLES\fR section for more specific exemptions.
.TP
-.I confcache
-Prevent econf from using confcache.
+.I bindist
+Distribution of binary packages is restricted.
.TP
.I fetch
like \fImirror\fR but the files will not be fetched via \fBSRC_URI\fR either.
" *** exiting successfully.")
from portage.util import normalize_path
+ # Dump the mod_echo output now so that our other notifications are shown
+ # last.
+ from portage.elog import mod_echo
+ mod_echo.finalize()
+
if "noinfo" not in settings.features:
chk_updated_info_files(normalize_path(target_root + EPREFIX), infodirs, info_mtimes, retval)
chk_updated_cfg_files(normalize_path(target_root + EPREFIX), config_protect)
try:
os.rename(os.path.join(newpath, old_pf + ".ebuild"),
os.path.join(newpath, new_pf + ".ebuild"))
- except OSError, e:
+ except EnvironmentError, e:
if e.errno != errno.ENOENT:
raise
del e
signal.alarm(0)
if hasattr(m, "finalize") and not m.finalize in _elog_atexit_handlers:
_elog_atexit_handlers.append(m.finalize)
- atexit_register(m.finalize, mysettings)
+ atexit_register(m.finalize)
except (ImportError, AttributeError), e:
writemsg("!!! Error while importing logging modules " + \
"while loading \"mod_%s\":\n" % str(s))
_items = {}
def process(mysettings, key, logentries, fulltext):
- _items[key] = logentries
+ global _items
+ config_root = mysettings["PORTAGE_CONFIGROOT"]
+ mysettings, items = _items.setdefault(config_root, (mysettings, {}))
+ items[key] = logentries
-def finalize(mysettings):
+def finalize():
+ global _items
+ for mysettings, items in _items.itervalues():
+ _finalize(mysettings, items)
+ _items.clear()
+
+def _finalize(mysettings, items):
printer = EOutput()
- for key in _items:
+ root_msg = ""
+ if mysettings["ROOT"] != "/":
+ root_msg = " merged to %s" % mysettings["ROOT"]
+ for key, logentries in items.iteritems():
print
- printer.einfo("Messages for package %s:" % key)
+ printer.einfo("Messages for package %s%s:" % (key, root_msg))
print
for phase in EBUILD_PHASES:
- if not phase in _items[key]:
+ if phase not in logentries:
continue
- for msgtype, msgcontent in _items[key][phase]:
+ for msgtype, msgcontent in logentries[phase]:
fmap = {"INFO": printer.einfo,
"WARN": printer.ewarn,
"ERROR": printer.eerror,
_items = {}
def process(mysettings, key, logentries, fulltext):
+ global _items
header = ">>> Messages generated for package %s by process %d on %s:\n\n" % \
(key, os.getpid(), time.strftime("%Y%m%d-%H%M%S", time.gmtime(time.time())))
- _items[key] = header + fulltext
+ config_root = mysettings["PORTAGE_CONFIGROOT"]
+ mysettings, items = _items.setdefault(config_root, (mysettings, {}))
+ items[key] = header + fulltext
-def finalize(mysettings):
- if len(_items) == 0:
+def finalize():
+ global _items
+ for mysettings, items in _items.itervalues():
+ _finalize(mysettings, items)
+ _items.clear()
+
+def _finalize(mysettings, items):
+ if len(items) == 0:
return
- elif len(_items) == 1:
+ elif len(items) == 1:
count = "one package"
else:
count = "multiple packages"
mybody = "elog messages for the following packages generated by " + \
"process %d on host %s:\n" % (os.getpid(), socket.getfqdn())
- for key in _items:
+ for key in items:
mybody += "- %s\n" % key
- mymessage = portage.mail.create_message(myfrom, myrecipient, mysubject, mybody, attachments=_items.values())
+ mymessage = portage.mail.create_message(myfrom, myrecipient, mysubject,
+ mybody, attachments=items.values())
portage.mail.send_mail(mysettings, mymessage)
return