summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2018-02-20 13:56:34 +0000
committerBen Brown <ben.brown@codethink.co.uk>2018-02-20 14:22:03 +0000
commitd7cf2548cef7e53f2450e3538a9e8e855dab3af9 (patch)
tree422290d01aa7368502257d98123757847c77ab66
parent1ae2a61783325dd4e54238c15b8dbac908d74e72 (diff)
downloadybd-d7cf2548cef7e53f2450e3538a9e8e855dab3af9.tar.gz
Log if we were unable to find the manifest to extract
This needn't cause an error, if it is required the component will fail during rpm generation. If the path is relative to the metadir, skip without warning.
-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):