@@ -105,6 +105,9 @@ def parse_cmdline():
parser.add_argument("--minor", action="store_true", default=False,
help="allow minor version upgrades within the same major (e.g. 3.5.x -> 3.6.x)")
+ parser.add_argument("--prebuild", action="store_true", default=False,
+ help="build each recipe at its current version before attempting upgrade")
+
parser.add_argument("-d", "--debug-level", type=int, default=4, choices=range(1, 6),
help="set the debug level: CRITICAL=1, ERROR=2, WARNING=3, INFO=4, DEBUG=5")
parser.add_argument("-e", "--send-emails", action="store_true", default=False,
@@ -516,6 +519,21 @@ class Updater(object):
attempted_pkggroups += 1
pkggroup_name = g["name"]
I(" ATTEMPT PACKAGE GROUP %d/%d" % (attempted_pkggroups, total_pkggroups))
+
+ # Build current version first to verify it builds and seed ABI reference
+ if self.args.prebuild and not self.args.skip_compilation:
+ I(" %s: Pre-building current version ..." % pkggroup_name)
+ try:
+ for machine in self.opts['machines']:
+ self.bb.complete(pkggroup_name, machine)
+ except Exception as e:
+ E(" %s: Pre-build FAILED, skipping upgrade" % pkggroup_name)
+ if isinstance(e, Error):
+ E(e.stdout + e.stderr)
+ g['error'] = e if isinstance(e, Error) else Error(message=str(e))
+ failed_pkggroups_ctx.append(g)
+ continue
+
try:
for pkg_ctx in g['pkgs']:
I(" %s: Upgrading to %s" % (pkg_ctx['PN'], pkg_ctx['NPV']))
@@ -571,6 +589,8 @@ class Updater(object):
tim.run()
for g in pkggroups_ctx:
+ if 'workdir' not in g:
+ continue
if g in succeeded_pkggroups_ctx:
os.symlink(g['workdir'], os.path.join( \