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

Bug#574336: pkgsel: Only run update-initramfs once during installation?

Package: pkgsel
Version: 0.25
Tags:    patch

When checking the Ubuntu changes to pkgsel, I noticed this change:

 - Divert update-initramfs and call it just once at the end (with
   bind-mounted /dev, /proc, and /sys, and a preceding update-dev).

This seem like a good optimization for the installation time to bring
over to Debian, making sure update-initramfs is only executed twice
during the installation instead of several times more (once when the
kernel is installed by base-insatller, and once after pkgsel is done).
Is there any reason not to include it?

This patch relative to the current svn version would implement it.  It
is ripped directly from the Ubuntu patch.

Index: debian/postinst
--- debian/postinst	(revision 62670)
+++ debian/postinst	(working copy)
@@ -6,7 +6,7 @@
 export LANG=C
-DIVERTS='/usr/bin/scrollkeeper-update /usr/bin/scrollkeeper-rebuilddb /usr/bin/fc-cache'
+DIVERTS='/usr/bin/scrollkeeper-update /usr/bin/scrollkeeper-rebuilddb /usr/bin/fc-cache /usr/sbin/update-initramfs'
 log() {
 	logger -t pkgsel "$@"
@@ -163,7 +163,22 @@
 	chroot /target fc-cache -f -v >/target/var/log/fontconfig.log 2>&1 \
 		|| true
+if [ -x /target/usr/sbin/update-initramfs ]; then
+	# get UUIDs for any devices formatted after partitioning
+	update-dev
+	# make UUIDs etc. available in the target system
+	mount -o bind /dev /target/dev
+	mount -o bind /sys /target/sys
+	mount -o bind /proc /target/proc
+	chroot /target /usr/sbin/update-initramfs -u || true
+	umount /target/proc
+	umount /target/sys
+	umount /target/dev
 db_progress STEP 30
 db_progress STOP
Happy hacking,
Petter Reinholdtsen

Reply to: