From da90dea3e11babc0d012033c8048dc5c19c618c0 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 7 Apr 2023 02:37:06 -0700 Subject: sync --dry-run wins if -d is also given --dry-run should not change the working copy, so if --dry-run is given along with -d (to download), the -d is ignored. --- MgaRepo/rpmutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MgaRepo') diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index 9673111..66343b5 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -556,7 +556,7 @@ def sync(dryrun=False, commit=False, download=False): if sourcesst.get(source): if not (source in binrepoentries) and sourcesst.get(source)[1] == '?': toadd.append(sourcepath) - elif not download and not os.path.isfile(sourcepath): + elif (not download or dryrun) and not os.path.isfile(sourcepath): sys.stderr.write("warning: %s not found\n" % sourcepath) elif download and not os.path.isfile(sourcepath): print("%s not found, downloading from %s" % (sourcepath, url)) -- cgit v1.2.1