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

[PATCH][REFACTORED] Better flexibility to control system base installation [was Re: [PATCH] Better flexibility to control system base installation



Christian Perrier <bubulle@debian.org> writes:

> I'd recommend to put that string in the short description and the
> whole description of the template purpose in the long description.
>
> The string is "for internal use"

I refactored it and I'm resending it for review. What do you think
now?

=== debian/base-installer.templates
==================================================================
--- debian/base-installer.templates	(/upstream/trunk/packages/base-installer)	(revision 4232)
+++ debian/base-installer.templates	(/base-installer)	(revision 4232)
@@ -412,3 +412,18 @@
 # TRANSLATORS: <65 columns
 _Description: Install the base system
 
+Template: base-installer/debootstrap_script
+Type: string
+Description: for internal use
+ Force use of a specific debootstrap script
+
+Template: base-installer/includes
+Type: string
+Description: for internal use
+ Packages to be included in base installation
+
+Template: base-installer/excludes
+Type: string
+Description: for internal use
+ Packages to be excluded in base installation
+
=== debian/postinst
==================================================================
--- debian/postinst	(/upstream/trunk/packages/base-installer)	(revision 4232)
+++ debian/postinst	(/base-installer)	(revision 4232)
@@ -11,8 +11,6 @@
 DIRECTORY=
 COMPONENTS=
 DISTRIBUTION=
-INCLUDES=
-EXCLUDES=
 KERNEL=
 KERNEL_LIST=/tmp/available_kernels.txt
 KERNEL_MAJOR="$(uname -r | cut -d . -f 1,2)"
@@ -38,6 +36,14 @@
 SUBARCH="$(archdetect)"
 SUBARCH="${SUBARCH#*/}"
 
+# Set initial value to includes and excludes
+db_get base-installer/includes
+INCLUDES="$RET" || true
+
+db_get base-installer/excludes
+EXCLUDES="$RET" || true
+
+
 log() {
 	logger -t base-installer "$@"
 }
@@ -125,11 +131,11 @@
 			COMPONENTS="*"
 		fi
 		if [ -s /cdrom/.disk/base_include ]; then
-			INCLUDES=`grep -v '^#' /cdrom/.disk/base_include | tr '\n' , | sed 's/,$//'`
+			INCLUDES="$INCLUDES,`grep -v '^#' /cdrom/.disk/base_include | tr '\n' , | sed 's/,$//'`"
 		fi
 			
 		if [ -s /cdrom/.disk/base_exclude ]; then
-			EXCLUDES=`grep -v '^#' /cdrom/.disk/base_exclude | tr '\n' , | sed 's/,$//'`
+			EXCLUDES="$EXCLUDES,`grep -v '^#' /cdrom/.disk/base_exclude | tr '\n' , | sed 's/,$//'`"
 		fi
 
 		# Sanity check: an error reading /cdrom/.disk/base_components can cause
@@ -193,6 +199,9 @@
 			export http_proxy
 		fi
 	fi
+
+	db_get base-installer/debootstrap_script
+	DEBOOTSTRAP_SCRIPT="$RET" || true
 	
 	# run the scripts found in hook directory before debootstrap
 	partsdir="/usr/lib/base-installer.d"
@@ -236,6 +245,7 @@
 			${keyring} \
 			${DISTRIBUTION} /target \
 			"$PROTOCOL://$MIRROR$DIRECTORY" \
+			${DEBOOTSTRAP_SCRIPT} \
 			|| debootstrap_failed=$?
 	fi
 
=== debian/changelog
==================================================================
--- debian/changelog	(/upstream/trunk/packages/base-installer)	(revision 4232)
+++ debian/changelog	(/base-installer)	(revision 4232)
@@ -7,8 +7,17 @@
   [ Frans Pop ]
   * Don't offer yaird for S/390 as it does not configure the dasds.
 
- -- Frans Pop <fjp@debian.org>  Sat, 12 Aug 2006 10:28:25 +0200
+  [ Otavio Salvador ]
+  * Add facility to use a specific script by preseeding
+    base-installer/script. That's a very interesting feature for Custom
+    Debian Distributions and derivatives.
+  * Add facility to include and exclude packages from base by preseeding
+    base-installer/includes and base-installer/excludes. The previous way
+    of doing that, using base_include and base_include CD files still
+    works and the packages are added to the preseeded ones.
 
+ -- Otavio Salvador <otavio@debian.org>  Sat, 12 Aug 2006 10:55:14 -0300
+
 base-installer (1.64) unstable; urgency=low
 
   [ Colin Watson ]

Property changes on: 
___________________________________________________________________
Name: svk:merge
 +48c42b26-1dd6-0310-b98f-a58d8bce7237:/trunk/packages/base-installer:39737
  a1877ced-7cdd-0310-a81f-9c9987c16c32:/base-installer/local:12

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://www.freedom.ind.br/otavio
---------------------------------------------
"Microsoft gives you Windows ... Linux gives
 you the whole house."

Reply to: