summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2017-10-13 13:14:26 +0100
committerBen Brown <ben.brown@codethink.co.uk>2017-10-13 13:14:30 +0100
commit13dec1257b947c864788764b1f53b716502d2302 (patch)
treebb7a0e8461ca9bf43fd396c2465097071ab49133
parent780223e8a12052f4d5e026cefb4eb37e15a93500 (diff)
downloadybd-13dec1257b947c864788764b1f53b716502d2302.tar.gz
Exit should multiple file match the prebuilt rpm pattern
Only applies if check-definitions is set to 'exit'.
-rw-r--r--ybd/rpm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ybd/rpm.py b/ybd/rpm.py
index 38c85b7..6b52963 100644
--- a/ybd/rpm.py
+++ b/ybd/rpm.py
@@ -362,8 +362,9 @@ def stage_prebuilts(dn, system):
log(dn, 'Failed to find prebuilt rpm matching', package['path'])
sys.exit(1)
if len(rpm_glob) > 1:
+ exit = config.get('check-definitions') == 'exit'
log(dn, 'WARNING: glob pattern %s matches multiple paths' %
- package['path'])
+ package['path'], exit=exit)
os.rename(rpm_glob[0], cache_path)