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

Bug#250092: base-installer: Should track dependencies for base_include



Package:  base-installer
Version:  0.081
Severity: wishlist
Tags:     d-i patch

At the moment, base-installer will use the content of
/cdrom/.disk/base_include on a CD as a list of extra deb packages to
install when the base system is installed.  This list of packages are
sent to debootstrap using the --include=<pkgs> option.  debootstrap do
not track dependencies, so one have to list all dependencies of new
packages as well.

I propose to change this implementation to call 'apt-install' for the
packages listed in base_include, and leave it to apt to pull in the
packages.  This will have some positive and negative sides:

 - Dependencies are automatically installed.  No need to track them
   manually, and one can limit the content of base_include to only the
   packages one want to have installed.

 - If packages are listed in both base_exclude and base_include, they
   will be installed with the new implementation, while they will not
   be installed with the old implementation.  The priority of
   base_exclude and base_include changes.

 - Failing to install a package in base_include will no longer be a
   fatal error.  debootstrap will fail if one of the packages listed
   in --include=<pkgs> fail to install, while 'apt-install' will just
   report the problem to syslog and carry on.

I believe the advantages outweight the problems with the new
implementation, and suggest this patch:

Index: debian/postinst
===================================================================
--- debian/postinst     (revision 15930)
+++ debian/postinst     (working copy)
@@ -12,7 +12,6 @@
 DIRECTORY=
 COMPONENTS=
 DISTRIBUTION=
-INCLUDES=
 EXCLUDES=
 KERNEL=
 KERNEL_LIST=/tmp/available_kernels.txt
@@ -74,7 +73,10 @@
                        COMPONENTS="*"
                fi
                if [ -s /cdrom/.disk/base_include ]; then
-                       INCLUDES=`grep -v '^#' /cdrom/.disk/base_include | tr '\n' , | sed 's/,$//'`
+                       # queue the extra packages for installation.
+                       for pkg in `grep -v '^#' /cdrom/.disk/base_include`; do
+                           apt-install $pkg || true
+                       done
                fi

                if [ -s /cdrom/.disk/base_exclude ]; then
@@ -125,9 +127,6 @@
 }

 install_base_system () {
-       if [ "${INCLUDES}" ]; then
-               include="--include=${INCLUDES}"
-       fi
        if [ "${EXCLUDES}" ]; then
                exclude="--exclude=${EXCLUDES}"
        fi

The patch is untested.



Reply to: