r2636 - in dists/trunk/live-helper: functions helpers

daniel at alioth.debian.org daniel at alioth.debian.org
Sun Jul 29 17:12:33 UTC 2007


Author: daniel
Date: 2007-07-29 17:12:33 +0000 (Sun, 29 Jul 2007)
New Revision: 2636

Modified:
   dists/trunk/live-helper/functions/packages.sh
   dists/trunk/live-helper/helpers/lh_chroot_localization
Log:
Temporarily reverting back to r2633 as previously discussed on IRC.

Modified: dists/trunk/live-helper/functions/packages.sh
===================================================================
--- dists/trunk/live-helper/functions/packages.sh	2007-07-29 16:59:59 UTC (rev 2635)
+++ dists/trunk/live-helper/functions/packages.sh	2007-07-29 17:12:33 UTC (rev 2636)
@@ -14,16 +14,38 @@
 	FILE="${1}"
 	PACKAGE="${2}"
 
-	Check_installed "${FILE}" "${PACKAGE}"
+	case "${LIVE_CHROOT_BUILD}" in
+		enabled)
+			for ITEM in ${PACKAGE}
+			do
+				if ! `Chroot "dpkg-query -s ${ITEM}"`
+				then
+					PACKAGES="${PACKAGES} ${ITEM}"
+				fi
+			done
+			;;
 
-	if [ ${INSTALL_STATUS} -eq 1 ]
-	then
-		PACKAGES="${PACKAGES} ${PACKAGE}"
-	elif [ ${INSTALL_STATUS} -eq 2 ]
-	then
-		Echo_error "You need to install ${PACKAGE} on your host system."
-		exit 1
-	fi
+		disabled)
+			if `which dpkg-query`
+			then
+				for ITEM in ${PACKAGE}
+				do
+					if ! `dpkg-query -s ${ITEM}`
+					then
+						PACKAGES="${PACKAGES} ${ITEM}"
+					fi
+				done
+			else
+				FILE="`echo ${FILE} | sed -e 's/chroot//'`"
+
+				if [ ! -f "${FILE}" ] && [ ! -d "${FILE}" ]
+				then
+					Echo_error "You need to install ${PACKAGE} on your host system."
+					exit 1
+				fi
+			fi
+			;;
+	esac
 }
 
 Install_package ()
@@ -57,46 +79,3 @@
 		esac
 	fi
 }
-
-# Check_installed
-# uses as return value global var INSTALL_STATUS
-# INSTALL_STATUS : 0 if package is installed
-#                  1 if package isn't installed and we're in an apt managed system
-#                  2 if package isn't installed and we aren't in an apt managed system
-Check_installed ()
-{
-	FILE="${1}"
-	PACKAGE="${2}"
-
-	case "${LIVE_CHROOT_BUILD}" in
-		enabled)
-			if Chroot "dpkg-query -s ${PACKAGE}" > /dev/null 2>&1
-			then
-				INSTALL_STATUS=0
-			else
-				INSTALL_STATUS=1
-			fi
-			;;
-		disabled)
-			if which dpkg-query > /dev/null 2>&1
-			then
-				if Chroot "dpkg-query -s ${PACKAGE}" > /dev/null 2>&1
-				then
-					INSTALL_STATUS=0
-				else
-					INSTALL_STATUS=1
-				fi
-			else
-				FILE="`echo ${FILE} | sed -e 's/chroot//'`"
-
-				if [ ! -f "${FILE}" ]
-				then
-					INSTALL_STATUS=2
-				else
-					INSTALL_STATUS=0
-				fi
-			fi
-			;;
-	esac
-}
-

Modified: dists/trunk/live-helper/helpers/lh_chroot_localization
===================================================================
--- dists/trunk/live-helper/helpers/lh_chroot_localization	2007-07-29 16:59:59 UTC (rev 2635)
+++ dists/trunk/live-helper/helpers/lh_chroot_localization	2007-07-29 17:12:33 UTC (rev 2636)
@@ -613,33 +613,33 @@
 	do
 		case "${LOCALIZATION}" in
 			iceape)
-				Check_installed chroot/usr/bin/iceape iceape || Check_package iceweasel-l10n-"${ICEAPE}"
+				Check_package chroot/usr/bin/iceape iceweasel-l10n-"${ICEAPE}"
 				;;
 
 			icedove)
-				Check_installed chroot/usr/bin/icedove icedove || Check_package icedove-locale-"${ICEDOVE}"
+				Check_package chroot/usr/bin/icedove icedove-locale-"${ICEDOVE}"
 				;;
 
 			iceweasel)
-				Check_installed chroot/usr/bin/iceweasel iceweasel || Check_package iceweasel-l10n-"${ICEWEASEL}" 
+				Check_package chroot/usr/bin/iceweasel iceweasel-l10n-"${ICEWEASEL}"
 				;;
 
 			kde)
-				Check_installed chroot/usr/bin/kstart kdebase-bin || Check_package kde-i18n-"${KDE}" 
+				Check_package chroot/usr/bin/kstart kde-i18n-"${KDE}"
 				;;
 
 			koffice)
-				Check_installed chroot/usr/bin/koconverter koffice || Check_package koffice-i18n-"${KOFFICE}"
+				Check_package chroot/usr/bin/usr/bin/koconverter koffice-i18n-"${KOFFICE}"
 				;;
 
 			openoffice)
-				Check_installed chroot/usr/bin/ooffice openoffice.org-common || Check_package openoffice.org-l10n-"${OPENOFFICE}" 
+				Check_package chroot/usr/bin/ooffice openoffice.org-l10n-"${OPENOFFICE}"
 				;;
 		esac
 	done
 
-	Check_installed chroot/usr/bin/gwenview gwenview || Check_package gwenview-i18n 
-	Check_installed chroot/usr/bin/k3b k3b || Check_package k3b-i18n
+	Check_package chroot/usr/bin/gwenview gwenview-i18n
+	Check_package chroot/usr/bin/k3b k3b-i18n
 
 	# Restoring cache
 	Restore_cache cache/packages_localization




More information about the debian-live-changes mailing list