diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2018-02-20 13:56:34 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2018-02-20 14:22:03 +0000 |
commit | d7cf2548cef7e53f2450e3538a9e8e855dab3af9 (patch) | |
tree | 422290d01aa7368502257d98123757847c77ab66 | |
parent | 1ae2a61783325dd4e54238c15b8dbac908d74e72 (diff) | |
download | ybd-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.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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): |