lgp: set APTCACHEHARDLINK to "no" if BUILDPLACE is a mountpoint (closes: #76639)

It will simplify experimentation with tmpfs

authorSylvain Thénault <sylvain.thenault@logilab.fr>
changeset59f17b849c01
branchdefault
phasepublic
hiddenno
parent revision#0f78c0548189 lgp: error message when distribution script not provided by debootstrap (closes: #74909)
child revision#b66df1a66004 lgp: hooks cleanup (closes: #77358)
files modified by this revision
etc/lgp/pbuilderrc.local
etc/lgp/pbuilderrc.sh
# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1317050764 -7200
# Mon Sep 26 17:26:04 2011 +0200
# Node ID 59f17b849c016752bd4cf8c900b89596c5841372
# Parent 0f78c054818912d9f349124574209562a022f7d0
lgp: set APTCACHEHARDLINK to "no" if BUILDPLACE is a mountpoint (closes: #76639)

It will simplify experimentation with tmpfs

diff --git a/etc/lgp/pbuilderrc.local b/etc/lgp/pbuilderrc.local
@@ -18,10 +18,8 @@
1  #UBUNTU_MIRRORSITE="http://xxx.xxx.xxx.xxx:3142/archive.ubuntu.com/ubuntu/"
2 
3  # 26. Using tmpfs for buildplace ($BUILDPLACE)
4  # http://www.netfort.gr.jp/~dancer/software/pbuilder-doc/pbuilder-doc.html#tmpfsforpbuilder
5  # To improve speed of operation, it is possible to use tmpfs for pbuilder build location.
6 -# Mount tmpfs to /var/cache/pbuilder/build, and set APTCACHEHARDLINK to no
7 -APTCACHEHARDLINK=no
8 -BUILDPLACE="/space/var/cache/pbuilder/${DIST}/dists/"
9 -
10 -
11 +# Mount tmpfs to /var/cache/pbuilder/build ($BUILDPLACE)
12 +# Lgp will automatically detect the mountpoint and set APTCACHEHARDLINK to no
13 +BUILDPLACE="/opt/var/cache/pbuilder/build/
diff --git a/etc/lgp/pbuilderrc.sh b/etc/lgp/pbuilderrc.sh
@@ -107,12 +107,16 @@
14 
15  # 26. Using tmpfs for buildplace ($BUILDPLACE)
16  # http://www.netfort.gr.jp/~dancer/software/pbuilder-doc/pbuilder-doc.html#tmpfsforpbuilder
17  # To improve speed of operation, it is possible to use tmpfs for pbuilder build location.
18  # Mount tmpfs to /var/cache/pbuilder/build, and set APTCACHEHARDLINK to no
19 -: ${APTCACHEHARDLINK:="yes"}
20 -: ${BUILDPLACE:="/var/cache/pbuilder/${DIST}/dists/"}
21 +if mountpoint $BUILDPLACE >/dev/null; then
22 +	APTCACHEHARDLINK="no"
23 +else
24 +	: ${APTCACHEHARDLINK:="yes"}
25 +fi
26 +: ${BUILDPLACE:="/var/cache/pbuilder/build/${DIST}/dists/"}
27 
28  # BINDMOUNTS is a space separated list of things to mount inside the chroot.
29  BINDMOUNTS="${BINDMOUNTS} /sys /dev"
30 
31  # "debconf: delaying package configuration, since apt-utils is not installed"