Subject: Re: bulk build+pkg_comp+libkver
To: Juan RP <juan@xtrarom.org>
From: None <brook@biology.nmsu.edu>
List: tech-pkg
Date: 05/05/2005 11:50:19
Juan RP writes:
 > I think your suggestion to modify the pre-build script is a better way
 > to fix that, please send your patch.

See below.  Any suggestions are welcome.

Cheers,
Brook

===========================================================================
--- mk/bulk/pre-build.orig	2005-02-22 16:30:24.000000000 -0700
+++ mk/bulk/pre-build	2005-05-02 08:25:22.000000000 -0600
@@ -88,6 +88,19 @@
 PKG_DBDIR=`(cd ${PKGLINT_PKG_DIR}; ${BMAKE} show-var VARNAME=PKG_DBDIR)`
 DEPOTBASE=`(cd ${PKGLINT_PKG_DIR}; ${BMAKE} show-var VARNAME=DEPOTBASE)`
 
+#
+# Preserve libkver
+#
+if `pkg_info -K ${PKG_DBDIR} -qe libkver`; then
+	echo "Preserving libkver"
+	( cd $LOCALBASE && tar cf /tmp/$$-libkver.tar                       \
+		lib/libkver.a lib/libkver.so*                               \
+		man/cat3/kver.* man/man3/kver.*                             \
+		sbin/sysctl )
+	_LD_PRELOAD="$LD_PRELOAD"
+	unset LD_PRELOAD
+fi
+
 for dbdir in ${PKG_DBDIR} ${DEPOTBASE}; do
 	echo Removing all installed packages in $dbdir
 	if [ -d $dbdir ]; then
@@ -148,6 +161,16 @@
 
 
 #
+# Restore libkver
+#
+if [ -f /tmp/$$-libkver.tar ]; then
+	echo "Restoring libkver"
+	( cd $LOCALBASE && tar xf /tmp/$$-libkver.tar )
+	LD_PRELOAD="$_LD_PRELOAD"
+	unset _LD_PRELOAD
+fi
+
+#
 # Install cvs package and do a cvs update here
 #
 if [ "$CVS_USER" != "" ]; then