[Debian-NP-Commits] r249 - people/vagrant/simple-cdd

Vagrant Cascadian debian-np-devel@lists.alioth.debian.org
Thu, 25 Nov 2004 17:37:54 -0700


Author: vagrant-guest
Date: Thu Nov 25 17:37:49 2004
New Revision: 249

Modified:
   people/vagrant/simple-cdd/build-simple-cdd
   people/vagrant/simple-cdd/default.preseed
Log:
install packages and debconf selections for all profiles


Modified: people/vagrant/simple-cdd/build-simple-cdd
==============================================================================
--- people/vagrant/simple-cdd/build-simple-cdd	(original)
+++ people/vagrant/simple-cdd/build-simple-cdd	Thu Nov 25 17:37:49 2004
@@ -112,16 +112,39 @@
 echo simple-cdd: packages
 make packages
 
+# make a backup of the extras directory, just in case
+tar cvzpf old.extras.tgz $simple_cdd_dir/extras/
+rm -rf $simple_cdd_dir/extras/
+
+extras_dir="$simple_cdd_dir/extras/simple-cdd"
+mkdir -p $extras_dir
+
 all_extras="$package_files $preseed_files"
-mkdir -p $simple_cdd_dir/extras/simple-cdd
+# copy files to extras directory
 for f in $all_extras ; do
-  cp -f $f $simple_cdd_dir/extras/simple-cdd/
+  cp -f $f $extras_dir/
+done
+
+# FIXME provide a selection mechanism for profile package and debconf
+# selections, rather than just installing them all
+
+# add files to be installed
+for p in $extras_dir/*.packages ; do
+  cat $p >> $extras_dir/default.packages.cache
 done
+sort -u $extras_dir/default.packages.cache > $extras_dir/install.packages
+rm $extras_dir/default.packages.cache
 
-# TODO modify default.preseed to include other files
-for a in $preseed_files ; do
-  cat $a >> $simple_cdd_dir/extras/simple-cdd/default.preseed
+# preseeding include files
+for p in $extras_dir/*.preseed  ; do
+  pfile="$(basename $p)"
+  if [ "$pfile" != "default.preseed" ]; then
+    preseed_includes="$preseed_includes $pfile"
+  fi
 done
+if [ -n "$preseed_includes" ]; then
+  echo d-i  preseed/include string $preseed_includes >> $extras_dir/default.preseed
+fi
 
 echo simple-cdd: extra files for simple-cdd
 make bin-extras CD=1 ROOTSRC=$simple_cdd_dir/extras DIR=.

Modified: people/vagrant/simple-cdd/default.preseed
==============================================================================
--- people/vagrant/simple-cdd/default.preseed	(original)
+++ people/vagrant/simple-cdd/default.preseed	Thu Nov 25 17:37:49 2004
@@ -63,7 +63,7 @@
 # prompt. This is a good way to install a set of packages you want, or to
 # tweak the configuration of the system.
 #base-config  base-config/late_command  string apt-get install zsh; chsh -s /bin/zsh
-base-config  base-config/late_command  string apt-get -yu install $(egrep ^[a-z0-9] /usr/local/simple-cdd/default.packages)
+base-config  base-config/late_command  string apt-get -yu install $(egrep ^[a-z0-9] /usr/local/simple-cdd/install.packages)
 
 #### Network configuration.