summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmgagnome29
1 files changed, 19 insertions, 10 deletions
diff --git a/mgagnome b/mgagnome
index eee5a60..fb9dd4f 100755
--- a/mgagnome
+++ b/mgagnome
@@ -1262,15 +1262,19 @@ def cmd_co_multi(args):
pass
def cmd_co(options, parser):
- with concurrent.futures.ProcessPoolExecutor(max_workers=8) as executor:
- if options.all:
- packages = ((package, package, options) for package in Downstream().packages)
- elif len(options.package):
- packages = ((package, package, options) for package in options.package)
- else:
- packages = ((l[0], "%s => %s" % (l[0], l[1]), options) for l in sorted(join_streams(auto_update=False)))
+ if options.all:
+ packages = ((package, package, options) for package in Downstream().packages)
+ elif len(options.package):
+ packages = ((package, package, options) for package in options.package)
+ else:
+ packages = ((l[0], "%s => %s" % (l[0], l[1]), options) for l in sorted(join_streams(auto_update=False)))
- executor.map(cmd_co_multi, packages)
+ if options.debug:
+ for package in packages:
+ cmd_co_multi(package)
+ else:
+ with concurrent.futures.ProcessPoolExecutor(max_workers=8) as executor:
+ executor.map(cmd_co_multi, packages)
def join_streams(show_version=False, only_diff_version=False, auto_update=True):
root = os.path.expanduser(Downstream.PKGROOT)
@@ -1590,7 +1594,7 @@ def cmd_clean_spec_multi(args):
for prov in provides_alt:
for mo in re_prov_get_version.finditer(prov):
if options.debug:
- print("NOTICE: Heuristically adding version %s from provide %s" % (mo.group('version'), provide))
+ print("NOTICE: Heuristically adding version %s from provide %s" % (mo.group('version'), prov))
versions.add(mo.group('version'))
check_for = keys['extra'](basereqs, versions)
@@ -1704,7 +1708,11 @@ def cmd_new_release(options, parser):
# XXX - module should reflect upstream name, this gives it the package name
s = SpecFile(os.path.join(cwd, "SPECS", "%s.spec" % package), module=package)
cur_release = s.release
- new_release = int(cur_release)+1
+ try:
+ new_release = int(cur_release)+1
+ except ValueError:
+ success = False
+ continue
cur_version = s.version
print("%s-%s => %s-%s" % (cur_version, cur_release, cur_version, new_release))
@@ -2073,6 +2081,7 @@ def main():
if options.debug:
# Often used in debugging
+ global pprint
import pprint
Downstream.PKGROOT=options.PKGROOT