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:
Daniel Baumann 2015-08-10 21:45:00 +02:00
parent 421419c7fc
commit 2dcb4dc06e
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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