Hello,
in order to speed up my builds, I run them in a directory I mounted
a tmpfs onto. This directory contains symlinks to the config and cache
directories. In my testing environment, this reduces the build time by
two third (I don’t pretend it would be the same for anyone: this
environment has some particularities that explain part of the
performance gain).
No problems so far, until I added a first package to
chroot_local-packages, which triggered a build error:
lh_chroot_sources hard-links such local packages into the chroot,
which obviously fails when these two places are located on
different filesystems.
The attached patch implements a workaround: if the hard-linking fails,
normal cp is tried.
Bye,
--
intrigeri <[EMAIL PROTECTED]>
>From ed225cdf3bc5a91dbeaf6c4a81de2e830fea11bb Mon Sep 17 00:00:00 2001
From: intrigeri <[EMAIL PROTECTED]>
Date: Thu, 7 Aug 2008 01:56:50 +0200
Subject: [PATCH] lh_chroot_sources: try normal cp when hard-linking fails
Signed-off-by: intrigeri <[EMAIL PROTECTED]>
---
helpers/lh_chroot_sources | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 4c763cb..14e0a0e 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -88,12 +88,14 @@ case "${1}" in
# 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 -l config/chroot_local-packages/*_"${LH_ARCHITECTURE}".deb chroot/root/local-packages \
+ || cp 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 -l config/chroot_local-packages/*_all.deb chroot/root/local-packages \
+ || cp config/chroot_local-packages/*_all.deb chroot/root/local-packages
fi
if ls chroot/root/local-packages/*.deb > /dev/null 2>&1
--
1.5.6.3
_______________________________________________
debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel