mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-07 20:59:41 -05:00
updpkgsums: use a throwaway build dir
This prevents updpkgsums from potentially dirtying an otherwise pristine directory (likely $PWD) when makepkg creates the srclinks. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
ee207d7c7b
commit
d9cf14ff1d
@ -79,6 +79,8 @@ fi
|
||||
# Generate the new sums and try to unlink the file before writing stdin back
|
||||
# into it. This final precaution shouldn't fail based on the previous checks,
|
||||
# but it's better to be extra careful before unlinking files.
|
||||
export BUILDDIR=$(mktemp -d --tmpdir updpkgsums.XXXXXX)
|
||||
trap "rm -rf '$BUILDDIR'" EXIT
|
||||
newsums=$(makepkg -g -p "$buildfile") && rm -f "$buildfile" &&
|
||||
exec awk -v newsums="$newsums" '
|
||||
/^[[:blank:]]*(md|sha)[[:digit:]]+sums=/,/\)[[:blank:]]*(#.*)?$/ {
|
||||
|
Loading…
x
Reference in New Issue
Block a user