Commit 690eae25 authored by Seblu's avatar Seblu

Re-Add check command

It's basically a report with a call to sync
parent 72559663
......@@ -74,6 +74,18 @@ def parse_argv():
p_report.add_argument("packages", nargs='*',
help="only report these packages")
p_report.set_defaults(func=command_report)
# check parser
p_check = sp_main.add_parser("check",
help="check packages versions")
p_check.add_argument("-f", "--fresh", action="store_true",
help="Only report fresh versions")
p_check.add_argument("-n", "--new", action="store_true",
help="Only report new versions")
p_check.add_argument("-s", "--sort", action="store_true",
help="sort packages by name")
p_check.add_argument("packages", nargs='*',
help="only check these packages")
p_check.set_defaults(func=command_check)
# sendmail parser
p_sendmail = sp_main.add_parser("sendmail",
help="sendmail packages versions by mail")
......@@ -130,6 +142,12 @@ def command_sync(args, vctrl):
# start syncing
vctrl.sync_packages()
def command_check(args, vctrl):
'''Handle check command call'''
# reduce the package list
args.sync=True
command_report(args, vctrl)
def command_report(args, vctrl):
'''Handle report command call'''
# reduce the package list
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment