From 005ffc19b5989c5a2c5ff550773975a58d264fa7 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 29 Oct 2025 11:28:43 +0900 Subject: [PATCH] Apply the repack filter on hard links destination --- src/taskgraph/run-task/fetch-content | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/taskgraph/run-task/fetch-content b/src/taskgraph/run-task/fetch-content index bcca069a6..97b4e75df 100755 --- a/src/taskgraph/run-task/fetch-content +++ b/src/taskgraph/run-task/fetch-content @@ -603,6 +603,10 @@ def repack_archive( if tarinfo.isfile(): tar.addfile(tarinfo, origtar.extractfile(tarinfo)) else: + # Hard links are relative to the root of the archive, + # so the filter needs to be applied to its destination. + if tarinfo.islnk(): + tarinfo.linkname = filter(tarinfo.linkname) tar.addfile(tarinfo) else: # We only change compression here. The tar stream is unchanged.