r2629 - in dists/trunk/live-helper: docs functions

daniel at alioth.debian.org daniel at alioth.debian.org
Sun Jul 29 13:32:18 UTC 2007


Author: daniel
Date: 2007-07-29 13:32:18 +0000 (Sun, 29 Jul 2007)
New Revision: 2629

Modified:
   dists/trunk/live-helper/docs/ChangeLog
   dists/trunk/live-helper/functions/packages.sh
Log:


Modified: dists/trunk/live-helper/docs/ChangeLog
===================================================================
--- dists/trunk/live-helper/docs/ChangeLog	2007-07-29 13:29:22 UTC (rev 2628)
+++ dists/trunk/live-helper/docs/ChangeLog	2007-07-29 13:32:18 UTC (rev 2629)
@@ -1,5 +1,8 @@
 2007-07-29  Daniel Baumann  <daniel at debian.org>
 
+	* functions/packages.sh:
+	  - Using dpkg-query to check for packages when building in chroot,
+	    and on systems where dpkg-query is available.
 	* functions/stagefile.sh:
 	  - Added missing NAME.
 

Modified: dists/trunk/live-helper/functions/packages.sh
===================================================================
--- dists/trunk/live-helper/functions/packages.sh	2007-07-29 13:29:22 UTC (rev 2628)
+++ dists/trunk/live-helper/functions/packages.sh	2007-07-29 13:32:18 UTC (rev 2629)
@@ -23,12 +23,20 @@
 			;;
 
 		disabled)
-			FILE="`echo ${FILE} | sed -e 's/chroot//'`"
+			if `which dpkg-query`
+			then
+				if ! `Chroot dpkg-query -s ${PACKAGE}`
+				then
+					PACKAGES="${PACKAGES} ${PACKAGE}"
+				fi
+			else
+				FILE="`echo ${FILE} | sed -e 's/chroot//'`"
 
-			if [ ! -f "${FILE}" ]
-			then
-				Echo_error "You need to install ${PACKAGE} on your host system."
-				exit 1
+				if [ ! -f "${FILE}" ]
+				then
+					Echo_error "You need to install ${PACKAGE} on your host system."
+					exit 1
+				fi
 			fi
 			;;
 	esac




More information about the debian-live-changes mailing list