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/<hash>-`, which can fail e.g. for
compressed files.
This commit is contained in:
Naïm Favier 2022-08-25 17:25:58 +02:00
parent e4d49de45a
commit 3c697db972
No known key found for this signature in database
GPG Key ID: 95AFCE8211908325

View File

@ -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