repo-add: make sure we get size of target file
If the package we were adding was a symlink, we stuck the symlink size in the database rather than the size of the file it referred to. Whoops! Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
7cead800c5
commit
20aa17c276
|
@ -184,11 +184,11 @@ GCC_VISIBILITY_CC
|
||||||
GCC_GNU89_INLINE_CC
|
GCC_GNU89_INLINE_CC
|
||||||
|
|
||||||
# Host-dependant definitions
|
# Host-dependant definitions
|
||||||
SIZECMD="stat -c %s"
|
SIZECMD="stat -L -c %s"
|
||||||
SEDINPLACE="sed -i"
|
SEDINPLACE="sed -i"
|
||||||
case "${host_os}" in
|
case "${host_os}" in
|
||||||
*bsd*)
|
*bsd*)
|
||||||
SIZECMD="stat -f %z"
|
SIZECMD="stat -L -f %z"
|
||||||
SEDINPLACE="sed -i ''"
|
SEDINPLACE="sed -i ''"
|
||||||
;;
|
;;
|
||||||
cygwin*)
|
cygwin*)
|
||||||
|
@ -197,7 +197,7 @@ case "${host_os}" in
|
||||||
;;
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
host_os_darwin=yes
|
host_os_darwin=yes
|
||||||
SIZECMD="/usr/bin/stat -f %z"
|
SIZECMD="/usr/bin/stat -L -f %z"
|
||||||
SEDINPLACE="/usr/bin/sed -i ''"
|
SEDINPLACE="/usr/bin/sed -i ''"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue