From d7cf2548cef7e53f2450e3538a9e8e855dab3af9 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 20 Feb 2018 13:56:34 +0000 Subject: 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. --- ybd/rpm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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): -- cgit v1.2.1