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ář <lsedlar@redhat.com>
This commit is contained in:
parent
08b9d275a8
commit
a1214525f5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user