Tells emerge to build binary packages for all ebuilds processed in
addition to actually merging the packages. Useful for maintainers
or if you administrate multiple Gentoo Linux systems (build once,
-emerge tbz2s everywhere). The package will be created in the
+emerge tbz2s everywhere) as well as disaster recovery. The package
+will be created in the
\fI${PKGDIR}/All\fR directory. An alternative for already\-merged
-packages is to use \fBquickpkg\fR which creates a tbz2 from the
+packages is to use \fBquickpkg\fR(1) which creates a tbz2 from the
live filesystem.
.TP
.BR "\-\-buildpkgonly " (\fB\-B\fR)
this file\fR.
.SH "SEE ALSO"
.BR "emerge \-\-help",
+.BR quickpkg (1),
.BR ebuild (1),
.BR ebuild (5),
.BR make.conf (5),
has a \fB\-\-force\fR option that can be used to force regeneration of digests.
.TP
.B buildpkg
-Binary packages will be created for all packages that are merged.
+Binary packages will be created for all packages that are merged. Also see
+\fBquickpkg\fR(1) and \fBemerge\fR(1) \fB\-\-buildpkg\fR and
+\fB\-\-buildpkgonly\fR options.
.TP
.B buildsyspkg
Build binary packages for just packages in the system set.
if depstring in self._set_atoms:
self._pprovided_args.append((arg, depstring))
- if myparent:
- # The parent is added after it's own dep_check call so that it
- # isn't allowed to satisfy a direct bootstrap dependency on itself
- # via an old-style virtual. This isn't a problem with new-style
- # virtuals, which are preferenced in dep_zapdeps by looking only at
- # the depstring, vdb, and available packages.
-
- p_type, p_root, p_key, p_status = myparent
- if p_status == "merge":
- # Update old-style virtuals if this package provides any.
- # These are needed for dep_virtual calls inside dep_check.
- p_db = self.mydbapi[p_root] # contains cached metadata
- if myparent in self._slot_collision_nodes:
- # The metadata isn't cached due to the slot collision.
- p_db = self.trees[p_root][self.pkg_tree_map[p_type]].dbapi
- try:
- self.pkgsettings[p_root].setinst(p_key, p_db)
- # For consistency, also update the global virtuals.
- settings = self.roots[p_root].settings
- settings.unlock()
- settings.setinst(p_key, p_db)
- settings.lock()
- except portage.exception.InvalidDependString, e:
- provide = p_db.aux_get(p_key, ["PROVIDE"])[0]
- show_invalid_depstring_notice(myparent, provide, str(e))
- del e
- return 0
-
if "--debug" in self.myopts:
print "Candidates:",mymerge
for x in mymerge:
display_news_notification(trees)
retval = action_build(settings, trees, mtimedb,
myopts, myaction, myfiles, spinner)
- if "--pretend" in myopts:
+ if "--pretend" not in myopts:
display_news_notification(trees)
return retval
print bold("Actions:")+" [ "+green("--clean")+" | "+green("--depclean")+" | "+green("--prune")+" | "+green("--regen")+" | "+green("--search")+" | "+green("--unmerge")+" ]"
def help(myaction,myopts,havecolor=1):
+ # TODO: Implement a wrap() that accounts for console color escape codes.
+ from textwrap import wrap
+ desc_left_margin = 14
+ desc_indent = desc_left_margin * " "
+ desc_width = 80 - desc_left_margin - 5
if not myaction and ("--verbose" not in myopts):
shorthelp()
print
print " time prior to the prompt will be interpreted as a choice!"
print
print " "+green("--buildpkg")+" ("+green("-b")+" short option)"
- print " Tell emerge to build binary packages for all ebuilds processed"
- print " (in addition to actually merging the packages. Useful for"
- print " maintainers or if you administrate multiple Gentoo Linux"
- print " systems (build once, emerge tbz2s everywhere) as well as disaster"
- print " recovery."
+ desc = "Tells emerge to build binary packages for all ebuilds processed in" + \
+ " addition to actually merging the packages. Useful for maintainers" + \
+ " or if you administrate multiple Gentoo Linux systems (build once," + \
+ " emerge tbz2s everywhere) as well as disaster recovery. The package" + \
+ " will be created in the" + \
+ " ${PKGDIR}/All directory. An alternative for already-merged" + \
+ " packages is to use quickpkg(1) which creates a tbz2 from the" + \
+ " live filesystem."
+ for line in wrap(desc, desc_width):
+ print desc_indent + line
print
print " "+green("--buildpkgonly")+" ("+green("-B")+" short option)"
print " Creates a binary package, but does not merge it to the"
self.settings, 0, 0, mydbapi)
prepare_build_dirs(destroot, self.settings, cleanup)
+ from portage.elog.messages import eerror as _eerror
def eerror(lines):
- cmd = "source '%s/isolated-functions.sh' ; " % PORTAGE_BIN_PATH
- for line in lines:
- cmd += "eerror '%s' ; " % line
- from portage import process
- process.spawn(["bash", "-c", cmd],
- env=self.settings.environ())
+ for l in lines:
+ _eerror(l, phase="preinst", key=self.settings.mycpv)
if collisions:
collision_protect = "collision-protect" in self.settings.features
phases = set(a)
phases.update(b)
for p in phases:
- rValue[p] = []
- if a.has_key(p):
- for x in a[p]:
- rValue[p].append(x)
- if b.has_key(p):
- for x in b[p]:
- rValue[p].append(x)
+ merged_msgs = []
+ rValue[p] = merged_msgs
+ for d in a, b:
+ msgs = d.get(p)
+ if msgs:
+ merged_msgs.extend(msgs)
return rValue
def _combine_logentries(logentries):
# generate a single string with all log messages
- rValue = ""
+ rValue = []
for phase in EBUILD_PHASES:
if not phase in logentries:
continue
+ previous_type = None
for msgtype, msgcontent in logentries[phase]:
- rValue += "%s: %s\n" % (msgtype, phase)
+ if previous_type != msgtype:
+ previous_type = msgtype
+ rValue.append("%s: %s\n" % (msgtype, phase))
for line in msgcontent:
- rValue += line
- rValue += "\n"
- return rValue
+ rValue.append(line)
+ rValue.append("\n")
+ return "".join(rValue)
_elog_atexit_handlers = []
_preserve_logentries = {}
s, levels = s.split(":", 1)
levels = levels.split(",")
mod_logentries = filter_loglevels(all_logentries[key], levels)
- mod_fulllog = combine_logentries(mod_logentries)
+ mod_fulllog = _combine_logentries(mod_logentries)
else:
mod_logentries = default_logentries
mod_fulllog = default_fulllog
"elog": ("LOG", "GOOD"),
"ewarn": ("WARN", "WARN"),
"eqawarn": ("QA", "WARN"),
- "eerror": ("ERROR", "ERROR"),
+ "eerror": ("ERROR", "BAD"),
}
def _make_msgfunction(level, color):
"ERROR": printer.eerror,
"LOG": printer.einfo,
"QA": printer.ewarn}
+ if isinstance(msgcontent, basestring):
+ msgcontent = [msgcontent]
for line in msgcontent:
fmap[msgtype](line.strip("\n"))
_items = []