summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2018-02-20 14:44:36 +0000
committerBen Brown <ben.brown@codethink.co.uk>2018-02-20 14:44:36 +0000
commit5b4fd1a0afb4e60e2af65fe8ce75d5312825fa42 (patch)
tree422290d01aa7368502257d98123757847c77ab66
parent1ae2a61783325dd4e54238c15b8dbac908d74e72 (diff)
parentd7cf2548cef7e53f2450e3538a9e8e855dab3af9 (diff)
downloadybd-5b4fd1a0afb4e60e2af65fe8ce75d5312825fa42.tar.gz
Merge branch 'benbrown/manifest-try' into 'master'
Log if we were unable to find the manifest to extract See merge request baserock/ybd!406
-rw-r--r--ybd/rpm.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ybd/rpm.py b/ybd/rpm.py
index 00c628f..3bc751f 100644
--- a/ybd/rpm.py
+++ b/ybd/rpm.py
@@ -272,7 +272,11 @@ def extract_manifests(system, dn, instdir, metadir):
if line.startswith('%manifest')}
for manifest in manifests:
manifest = expand_macro(system, dn, manifest)
- shutil.move(os.path.join(instdir, manifest), metadir)
+ try:
+ shutil.move(os.path.join(instdir, manifest), metadir)
+ except IOError:
+ if not os.path.exists(os.path.join(metadir, manifest)):
+ log(dn, 'WARNING: Failed to extract manifest:', manifest)
def get_package_names_with_fields(system, dn, fields):