[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Respect APT/APTITUDE options in functions/packages.sh



Hello,

 This patch updates functions/packages.sh to respect APT_OPTIONS and APTITUDE_OPTIONS which are set in common configuration file.

Cheers,

--
Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somerville@canonical.com

diff --git a/functions/packages.sh b/functions/packages.sh
index 53c244a..80eae9e 100755
--- a/functions/packages.sh
+++ b/functions/packages.sh
@@ -32,11 +32,11 @@ Install_package ()
 	then
 		case "${LH_APT}" in
 			apt|apt-get)
-				Chroot chroot "apt-get install -o APT::Install-Recommends=false --yes ${_LH_PACKAGES}"
+				Chroot chroot "apt-get install -o APT::Install-Recommends=false ${APT_OPTIONS} ${_LH_PACKAGES}"
 				;;
 
 			aptitude)
-				Chroot chroot "aptitude install --without-recommends --assume-yes ${_LH_PACKAGES}"
+				Chroot chroot "aptitude install --without-recommends ${APTITUDE_OPTIONS} ${_LH_PACKAGES}"
 				;;
 		esac
 	fi
@@ -48,11 +48,11 @@ Remove_package ()
 	then
 		case "${LH_APT}" in
 			apt|apt-get)
-				Chroot chroot "apt-get remove --purge --yes ${_LH_PACKAGES}"
+				Chroot chroot "apt-get remove --purge ${APT_OPTIONS} ${_LH_PACKAGES}"
 				;;
 
 			aptitude)
-				Chroot chroot "aptitude purge --assume-yes ${_LH_PACKAGES}"
+				Chroot chroot "aptitude purge ${APTITUDE_OPTIONS ${_LH_PACKAGES}"
 				;;
 		esac
 	fi

Reply to: