Updating stat calls to also give the right result in container setups, thanks to Kristian Klausen <klausenbusk@hotmail.com> (Closes: #789300).
This commit is contained in:
parent
421419c7fc
commit
2dcb4dc06e
|
@ -17,7 +17,7 @@ Restore_cache ()
|
|||
if [ -e "${DIRECTORY}" ]
|
||||
then
|
||||
# Restore old cache
|
||||
if [ "$(stat --printf %d ${DIRECTORY})" = "$(stat --printf %d chroot/var/cache/apt/archives)" ]
|
||||
if [ "$(stat --printf %d ${DIRECTORY}/)" = "$(stat --printf %d chroot/var/cache/apt/archives/)" ]
|
||||
then
|
||||
# with hardlinks
|
||||
find "${DIRECTORY}" -name "*.deb" | xargs cp -fl -t chroot/var/cache/apt/archives
|
||||
|
|
|
@ -220,8 +220,8 @@ EOF
|
|||
rm -rf chroot/root/packages
|
||||
mkdir -p chroot/root/packages
|
||||
|
||||
if [ "$(stat --printf %d config/packages.chroot)" = "$(stat --printf %d chroot/root/packages)" ] ||
|
||||
[ "$(stat --printf %d config/packages)" = "$(stat --printf %d chroot/root/packages)" ]
|
||||
if [ "$(stat --printf %d config/packages.chroot/)" = "$(stat --printf %d chroot/root/packages/)" ] ||
|
||||
[ "$(stat --printf %d config/packages/)" = "$(stat --printf %d chroot/root/packages/)" ]
|
||||
then
|
||||
CP_OPTIONS="-l"
|
||||
fi
|
||||
|
|
|
@ -224,7 +224,7 @@ Download_file () {
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$(stat --printf %d "${_LB_CACHE_DIR}")" = "$(stat --printf %d ./)" ]
|
||||
if [ "$(stat --printf %d "${_LB_CACHE_DIR}/")" = "$(stat --printf %d ./)" ]
|
||||
then
|
||||
CP_OPTIONS="-l"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue