From e8d7aa7bd60e14b4f204536a5c0cb9be84cb844a Mon Sep 17 00:00:00 2001 From: berrux_dev Date: Fri, 20 Nov 2026 14:32:56 +0100 Subject: [PATCH] Skip dangling symlinks when staging sources for the DEB packages os.walk classifies broken symlinks as files; external/ArcGIS is a relative symlink to the pipeline root that resolves on the host but dangles once the tree is staged to a flat directory, so shutil.copy2 crashed with FileNotFoundError while building qt6-release-sources. Skip dangling symlinks (they carry no copyable content) instead of aborting. --- .../rpmbuild/make_rpm_ubuntu26_release2.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qt6-after/qt6-migrated-legatus/rpmbuild/make_rpm_ubuntu26_release2.py b/qt6-after/qt6-migrated-legatus/rpmbuild/make_rpm_ubuntu26_release2.py index 7287fcf36..cb4e16fd9 100644 --- a/qt6-after/qt6-migrated-legatus/rpmbuild/make_rpm_ubuntu26_release2.py +++ b/qt6-after/qt6-migrated-legatus/rpmbuild/make_rpm_ubuntu26_release2.py @@ -100,6 +100,13 @@ def copy_src_dir_to_dest_dir(src_dir, dest_dir, file_filter=None): prune_dirs(dirs, root, file_filter) for file in files: src_file = os.path.join(root, file) + if os.path.islink(src_file) and not os.path.exists(src_file): + # Dangling symlink: os.walk reports broken links as files, but + # there is nothing to copy. These are relative links to outside + # the tree (e.g. external/ArcGIS) that resolve on the host but + # dangle once the tree is staged to a flat directory. + debug(f" Skipping dangling symlink: {src_file}") + continue if file_filter and file_filter(src_file): continue dest_file = os.path.join(dest_dir, os.path.relpath(src_file, src_dir))