From 80e59fb47204b866dfabbc6382e8cc09b0b9eac2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 7 Aug 2008 19:45:24 +0200 Subject: [PATCH] Only using hardlinks for local-packages when hardlinks are possible. --- helpers/lh_chroot_sources | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources index 4c763cb16..9da2c0d3f 100755 --- a/helpers/lh_chroot_sources +++ b/helpers/lh_chroot_sources @@ -85,15 +85,20 @@ case "${1}" in rm -rf chroot/root/local-packages mkdir -p chroot/root/local-packages + if [ "$(stat --printf %d config/chroot_local-packages)" = "$(stat --printf %d chroot/root/local-packages)" ] + then + CP_OPTIONS="-l" + fi + # Copy packages if ls config/chroot_local-packages/*_"${LH_ARCHITECTURE}".deb > /dev/null 2>&1 then - cp -l config/chroot_local-packages/*_"${LH_ARCHITECTURE}".deb chroot/root/local-packages + cp ${CP_OPTIONS} config/chroot_local-packages/*_"${LH_ARCHITECTURE}".deb chroot/root/local-packages fi if ls config/chroot_local-packages/*_all.deb > /dev/null 2>&1 then - cp -l config/chroot_local-packages/*_all.deb chroot/root/local-packages + cp ${CP_OPTIONS} config/chroot_local-packages/*_all.deb chroot/root/local-packages fi if ls chroot/root/local-packages/*.deb > /dev/null 2>&1