diff options
author | Olav Vitters <olav@vitters.nl> | 2020-04-22 15:38:53 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2020-04-22 15:38:53 +0200 |
commit | 47f77b637758cdde4a2fdc90f19633d488205ce6 (patch) | |
tree | 95be3ead58c6c965a6089ff1ee7b6b80430461c2 | |
parent | 9a5056a80e75c5a09f7e50d038d20462e5bafb3e (diff) | |
download | mgagnome-47f77b637758cdde4a2fdc90f19633d488205ce6.tar mgagnome-47f77b637758cdde4a2fdc90f19633d488205ce6.tar.gz mgagnome-47f77b637758cdde4a2fdc90f19633d488205ce6.tar.bz2 mgagnome-47f77b637758cdde4a2fdc90f19633d488205ce6.tar.xz mgagnome-47f77b637758cdde4a2fdc90f19633d488205ce6.zip |
improve the debug messages and handling
-rwxr-xr-x | mgagnome | 29 |
1 files changed, 19 insertions, 10 deletions
@@ -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 |