mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-12 14:13:36 +00:00
343de5ebc7
Hard links do not work on Android since 6.0. So modify the file locking mechanism from: if ln "$tmpfile" "$lockf"; then rm -f "$tmpfile"; .. to if mv --update=none-fail "$tmpfile" "$lockf"; then .. Fixes #21736
32 lines
903 B
Diff
32 lines
903 B
Diff
diff -u -r ../keychain-2.8.5/keychain ./keychain
|
|
--- ../keychain-2.8.5/keychain 2018-01-24 15:07:59.000000000 +0000
|
|
+++ ./keychain 2024-10-09 11:21:21.866473482 +0000
|
|
@@ -15,7 +15,7 @@
|
|
|
|
version=2.8.5
|
|
|
|
-PATH="${PATH:-/usr/bin:/bin:/sbin:/usr/sbin:/usr/ucb}"
|
|
+PATH=@TERMUX_PREFIX@/bin
|
|
|
|
maintainer="x48rph@gmail.com"
|
|
unset mesglog
|
|
@@ -360,16 +360,14 @@
|
|
tmpfile="$lockf.$$"
|
|
|
|
echo $$ >"$tmpfile" 2>/dev/null || exit
|
|
- if ln "$tmpfile" "$lockf" 2>/dev/null; then
|
|
- rm -f "$tmpfile"
|
|
+ if mv --update=none-fail "$tmpfile" "$lockf" 2>/dev/null; then
|
|
havelock=true && return 0
|
|
fi
|
|
if kill -0 $(cat $lockf 2>/dev/null) 2>/dev/null; then
|
|
rm -f "$tmpfile"
|
|
return 1
|
|
fi
|
|
- if ln "$tmpfile" "$lockf" 2>/dev/null; then
|
|
- rm -f "$tmpfile"
|
|
+ if mv --update=none-fail "$tmpfile" "$lockf" 2>/dev/null; then
|
|
havelock=true && return 0
|
|
fi
|
|
rm -f "$tmpfile" "$lockf" && return 1
|