From 3c697db9725f56e61c72f0d80051267a4fa4c32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 25 Aug 2022 17:25:58 +0200 Subject: [PATCH] removeReferencesTo: kill lone hashes Nix counts any occurrence of a store path's *hash* as a reference, even without a store directory prefix. The current version only kills references of the form `/nix/store/-`, which can fail e.g. for compressed files. --- pkgs/build-support/remove-references-to/remove-references-to.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 pkgs/build-support/remove-references-to/remove-references-to.sh diff --git a/pkgs/build-support/remove-references-to/remove-references-to.sh b/pkgs/build-support/remove-references-to/remove-references-to.sh old mode 100644 new mode 100755 index d8d38dbd80a9..f1b5dde5f073 --- a/pkgs/build-support/remove-references-to/remove-references-to.sh +++ b/pkgs/build-support/remove-references-to/remove-references-to.sh @@ -27,7 +27,7 @@ for i in "$@"; do done for target in "${targets[@]}" ; do - sed -i -e "s|@storeDir@/$target-|@storeDir@/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" "${regions[@]}" + sed -i -e "s|$target|eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee|g" "${regions[@]}" done for region in "${regions[@]}"; do