aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2023-04-07 02:37:06 -0700
committerDan Fandrich <danf@mageia.org>2023-04-07 02:37:06 -0700
commitda90dea3e11babc0d012033c8048dc5c19c618c0 (patch)
treefe80c3c20c49456ef88a4da1d5020f94ece35754
parent5c4da9584ed0183f828c456204ecdbe7102ab7db (diff)
downloadmgarepo-da90dea3.tar
mgarepo-da90dea3.tar.gz
mgarepo-da90dea3.tar.bz2
mgarepo-da90dea3.tar.xz
mgarepo-da90dea3.zip
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.
-rw-r--r--MgaRepo/rpmutil.py2
1 files changed, 1 insertions, 1 deletions
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))