summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2020-04-23 17:41:01 +0200
committerOlav Vitters <olav@vitters.nl>2020-04-23 17:41:01 +0200
commit10c4c981e3e8f731486fbef2b437fbac0b9c0631 (patch)
tree5bed13d496d639b3a46ec6bf62c797c592f858e5
parentb202fdd45973a9ec02699d29bc27b4d0f05bfae8 (diff)
downloadmgagnome-10c4c981e3e8f731486fbef2b437fbac0b9c0631.tar
mgagnome-10c4c981e3e8f731486fbef2b437fbac0b9c0631.tar.gz
mgagnome-10c4c981e3e8f731486fbef2b437fbac0b9c0631.tar.bz2
mgagnome-10c4c981e3e8f731486fbef2b437fbac0b9c0631.tar.xz
mgagnome-10c4c981e3e8f731486fbef2b437fbac0b9c0631.zip
remove parser argument for the various cmd functions
-rwxr-xr-xmgagnome28
1 files changed, 14 insertions, 14 deletions
diff --git a/mgagnome b/mgagnome
index d8f277b..6cf4824 100755
--- a/mgagnome
+++ b/mgagnome
@@ -1184,7 +1184,7 @@ def cmd_co_multi(args):
except subprocess.CalledProcessError:
pass
-def cmd_co(options, parser):
+def cmd_co(options):
if options.all:
packages = ((package, package, options) for package in Downstream().packages)
elif options.package:
@@ -1236,7 +1236,7 @@ def join_streams(show_version=False, only_diff_version=False, auto_update=True):
yield (package, module, package_version, spec_version, downstream.files[package])
-def cmd_group_owner(options, parser):
+def cmd_group_owner(options):
groups = set(options.group)
output = [pkg.split("\t") for pkg in subprocess.check_output(["urpmf", "-F|", "--qf", "%group\t%name\t%sourcerpm\t%version\t%release", "."]).decode("utf-8").splitlines()]
@@ -1283,7 +1283,7 @@ def cmd_group_owner(options, parser):
for line in sorted(get_output(source, maints, packages[group])):
print(line)
-def cmd_cleanup(options, parser):
+def cmd_cleanup(options):
root = os.path.expanduser(Downstream.PKGROOT)
# packages = set(Downstream().packages)
@@ -1317,7 +1317,7 @@ def cmd_cleanup(options, parser):
elif os.path.isdir(stat.path):
shutil.rmtree(stat.path)
-def cmd_ls(options, parser):
+def cmd_ls(options):
streams = join_streams(show_version=options.show_version, only_diff_version=options.diff)
if options.sort:
SORT = dict(list(zip(options.sort.read().splitlines(), itertools.count())))
@@ -1333,7 +1333,7 @@ def cmd_ls(options, parser):
if options.show_version: sys.stdout.write("\t%s\t%s" % (spec_version, package_version))
print()
-def cmd_check_version(options, parser):
+def cmd_check_version(options):
streams = join_streams(show_version=True)
for package, module, package_version, spec_version, downstream_files in streams:
@@ -1344,7 +1344,7 @@ def cmd_check_version(options, parser):
sys.stdout.write("\t%s\t%s" % (spec_version, package_version))
sys.stdout.write("\n")
-def cmd_check_latest(options, parser):
+def cmd_check_latest(options):
streams = join_streams(show_version=True)
for package, module, package_version, spec_version, downstream_files in streams:
@@ -1385,7 +1385,7 @@ def cmd_check_latest(options, parser):
cmd = ['mgagnome', 'increase', package, safe_version]
subprocess.call(cmd, cwd=Downstream.package_path(package))
-def cmd_patches(options, parser):
+def cmd_patches(options):
root = os.path.expanduser(Downstream.PKGROOT)
for package, module, package_version, spec_version, downstream_files in sorted(join_streams()):
@@ -1395,7 +1395,7 @@ def cmd_patches(options, parser):
p = Patch(os.path.join(root, package, "SOURCES", filename), show_path=options.path)
print("\t".join((module, package, str(p))))
-def cmd_check_prep(options, parser):
+def cmd_check_prep(options):
s = Downstream.package_spec(options.package)
s.check_and_update_patches()
@@ -1612,7 +1612,7 @@ def cmd_check_spec_multi(args):
return True
-def cmd_check_spec(options, parser):
+def cmd_check_spec(options):
if options.all:
packages = Downstream().packages
else:
@@ -1629,7 +1629,7 @@ def cmd_check_spec(options, parser):
-def cmd_clean_spec(options, parser):
+def cmd_clean_spec(options):
if options.all:
packages = Downstream().packages
else:
@@ -1647,7 +1647,7 @@ def cmd_clean_spec(options, parser):
with concurrent.futures.ThreadPoolExecutor(max_workers=workers) as executor:
executor.map(cmd_clean_spec_multi, ((options, package) for package in packages))
-def cmd_new_release(options, parser):
+def cmd_new_release(options):
success = True
for pkg in options.package:
# Determine the package name
@@ -1717,7 +1717,7 @@ def cmd_new_release(options, parser):
if not success:
sys.exit(1)
-def cmd_package_new_version(options, parser):
+def cmd_package_new_version(options):
# Determine the package name
if options.upstream:
try:
@@ -1795,7 +1795,7 @@ def cmd_package_new_version(options, parser):
except subprocess.CalledProcessError:
sys.exit(1)
-def cmd_parse_ftp_release_list(options, parser):
+def cmd_parse_ftp_release_list(options):
def _send_reply_mail(contents, orig_msg, to, packages=[], error=False):
"""Send an reply email"""
contents.seek(0)
@@ -2061,7 +2061,7 @@ def main():
Downstream.DISTRO = options.distro
try:
- options.func(options, parser)
+ options.func(options)
except KeyboardInterrupt:
print('Interrupted')
sys.exit(1)