Add the possibility to print when a package isn't going to be updated

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2019-11-22 16:05:44 +01:00
parent 81256bdd8a
commit 0e036348d0

View file

@ -357,6 +357,9 @@ class BugzillaProxy:
except xmlrpc.client.ProtocolError as e:
e.args = ('ProtocolError', e.errcode, e.errmsg)
raise
else:
if self.config.get("print-no-change"):
print(f"[NOCHANGE] {package}/{self.config['products'][collection]}")
else:
# Add component
data = {
@ -559,6 +562,9 @@ class DistgitBugzillaSync:
'--print-fas-names', action='store_true', default=False,
help="Print FAS names rather than email addresses in output, useful when pasting into "
"public fora")
parser.add_argument(
'--print-no-change', action='store_true', default=False,
help="Print elements that are not being changed as they are checked")
self.args = parser.parse_args()
@ -729,6 +735,8 @@ class DistgitBugzillaSync:
if self.args.dryrun:
self.env["dryrun"] = True
self.env["print-no-change"] = self.args.print_no_change
# Non-fatal errors to alert people about
errors = []