diff options
-rwxr-xr-x | commands/check-system | 6 | ||||
-rw-r--r-- | devbot/system.py | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/commands/check-system b/commands/check-system index ef559b1..d605434 100755 --- a/commands/check-system +++ b/commands/check-system @@ -9,10 +9,10 @@ from devbot import system common.setup() parser = argparse.ArgumentParser(description='Check the system') -parser.add_argument("--autoupdate", action="store_true", +parser.add_argument("--update", action="store_true", help="first of all update the system") -parser.add_argument("--autoremove", action="store_true", +parser.add_argument("--remove", action="store_true", help="remove all the unnecessary packages") args = parser.parse_args() -system.check(autoupdate=args.autoupdate, autoremove=args.autoremove) +system.check(update=args.update, remove=args.remove) diff --git a/devbot/system.py b/devbot/system.py index f350097..ca9ff13 100644 --- a/devbot/system.py +++ b/devbot/system.py @@ -148,7 +148,7 @@ def warn_if_unsupported(distro_name): "distributions listed in the README.\n" \ "*********************************************************\n" -def autoremove_packages(packages): +def remove_packages(packages): distro_name = distro.get_distro_name() package_manager = distro.get_package_manager() @@ -178,7 +178,7 @@ def autoremove_packages(packages): if to_remove: package_manager.remove_packages(to_remove) -def check(autoremove=False, autoupdate=False): +def check(remove=False, update=False): distro_name = distro.get_distro_name() packages = config.load_packages() @@ -196,9 +196,9 @@ def check(autoremove=False, autoupdate=False): stop_xvfb(xvfb_proc, orig_display) - if autoupdate: + if update: package_manager = distro.get_package_manager() package_manager.update() - if autoremove: - autoremove_packages(packages) + if remove: + remove_packages(packages) |