separateDebugInfo: don't create broken symlinks (#378316)
This commit is contained in:
@@ -226,9 +226,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# injected by the pkgsStatic stdenv
|
||||
# <https://github.com/NixOS/nixpkgs/issues/83667>
|
||||
rm -f $out/nix-support/propagated-build-inputs
|
||||
'' + lib.optionalString finalAttrs.separateDebugInfo ''
|
||||
# HACK: remove broken symlink created by hook
|
||||
rm $debug/lib/debug/s390-ccw.img
|
||||
'';
|
||||
preBuild = "cd build";
|
||||
|
||||
|
||||
@@ -43,10 +43,11 @@ _separateDebugInfo() {
|
||||
then
|
||||
echo "separate-debug-info: warning: multiple files with build id $id found, overwriting"
|
||||
fi
|
||||
$OBJCOPY --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug"
|
||||
|
||||
# Also a create a symlink <original-name>.debug.
|
||||
ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
|
||||
(
|
||||
$OBJCOPY --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug" &&
|
||||
# Also a create a symlink <original-name>.debug.
|
||||
ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"
|
||||
)
|
||||
) || rmdir -p "$dst/${id:0:2}"
|
||||
done < <(find "$prefix" -type f -print0 | sort -z)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user