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

Bug#283510: installation-reports



I propose the attached patch to base-installer's postinst to avoid this 
error. I've used an existing general error message, so no string changes 
are needed (after all, it is a fairly exceptional situation.

This patch has already been committed to TRUNK. Please review and upload.
I think this patch should be considered for Sarge.
Index: base-installer/debian/postinst
===================================================================
--- base-installer/debian/postinst	(revision 24094)
+++ base-installer/debian/postinst	(working copy)
@@ -98,6 +98,12 @@
 		if [ -s /cdrom/.disk/base_exclude ]; then
 			EXCLUDES=`grep -v '^#' /cdrom/.disk/base_exclude | tr '\n' , | sed 's/,$//'`
 		fi
+
+		# Sanity check: an error reading /cdrom/.disk/base_components can cause
+		# ugly errors in debootstrap because $COMPONENTS will be empty.
+		if [ -z "$COMPONENTS" ]; then
+			exit_error base-installer/cannot_install
+		fi
 	else
 		mirror_error=""
 		
Index: base-installer/debian/changelog
===================================================================
--- base-installer/debian/changelog	(revision 24094)
+++ base-installer/debian/changelog	(working copy)
@@ -1,3 +1,11 @@
+base-installer (1.14) UNRELEASED; urgency=low
+
+  * Frans Pop
+    - Add sanity check in postinst for empty COMPONENTS to guard against
+      ugly and difficult to trace errors from debootstrap. Closes: #283510.
+
+ -- Frans Pop <aragorn@tiscali.nl>  Wed,  1 Dec 2004 14:53:07 +0100
+
 base-installer (1.13) unstable; urgency=low
 
   * Bdale Garbee

Reply to: