From a1214525f5816475367be7823ce2454e256205af Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Mar 13 2017 13:45:13 +0000 Subject: unified-iso: Log better error when linking fails When linking files fails due to target path already existing, we should print details about the conflict. Signed-off-by: Lubomír Sedlář --- diff --git a/pungi_utils/unified_isos.py b/pungi_utils/unified_isos.py index 4254ee1..2f47159 100644 --- a/pungi_utils/unified_isos.py +++ b/pungi_utils/unified_isos.py @@ -114,7 +114,12 @@ class UnifiedISO(object): new_path = os.path.join(self.temp_dir, "trees", arch, old_relpath) makedirs(os.path.dirname(new_path)) - self.linker.link(old_path, new_path) + try: + self.linker.link(old_path, new_path) + except OSError as exc: + print("Failed to link %s to %s: %s" % (old_path, new_path, exc.strerror), + file=sys.stderr) + raise def link_to_temp(self): # copy files to new location; change RPM location to $variant_uid