[SCM] debian-live/live-helper branch, master, updated. 1.0_a44-1-17-g5bc25fd
Daniel Baumann
daniel at debian.org
Sat Apr 19 15:43:01 UTC 2008
The following commit has been merged in the master branch:
commit 5bc25fd2eb9e3cad686b38e36f6cbc17782b56eb
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Apr 19 17:39:44 2008 +0200
Adjusting Save_cache(); to skip already cached .deb files and only copying new packages to it.
diff --git a/functions/cache.sh b/functions/cache.sh
index 5493471..9e70f2c 100755
--- a/functions/cache.sh
+++ b/functions/cache.sh
@@ -45,14 +45,15 @@ Save_cache ()
mkdir -p "${DIRECTORY}"
# Saving new cache
- if [ "$(stat --printf %d ${DIRECTORY})" = "$(stat --printf %d chroot/var/cache/apt/archives)" ]
- then
- # with hardlinks
- cp -fl chroot/var/cache/apt/archives/*.deb "${DIRECTORY}"
- else
- # without hardlinks
- mv -f chroot/var/cache/apt/archives/*.deb "${DIRECTORY}"
- fi
+ for PACKAGE in chroot/var/cache/apt/archives/*.deb
+ do
+ if [ -e "${DIRECTORY}"/"$(basename ${PACKAGE})" ]
+ then
+ rm -f "${PACKAGE}"
+ else
+ mv "${PACKAGE}" "${DIRECTORY}"
+ fi
+ done
fi
else
# Purging current cache
--
debian-live/live-helper
More information about the debian-live-changes
mailing list