tasksel in package_config

Chad C. Walstrom chewie at wookimus.net
Wed Jan 9 19:44:19 CET 2002


To fix the tasksel problem, Ronan suggested the following patch:

> Here is a patch to /usr/lib/fai/nfsroot/sbin/install_packages:
> --- /usr/lib/fai/nfsroot/sbin/install_packages~ Fri Nov 16 17:56:16 2001
> +++ /usr/lib/fai/nfsroot/sbin/install_packages  Tue Jan  8 10:44:27 2002
> @@ -95,8 +95,12 @@
>      grep { $misspelt{$_} or $newlist .= "$_ "} @{$list{install}};
>      $packlist = $newlist;
>    }
>  
> +  if ($type eq "taskinst") {
> +    $rootcmd = 'yes "" | ' . $rootcmd;
> +  }
> +
>    execute("$rootcmd $command{$type} $packlist") if $packlist;
>  }
>  
>  # remove prelaoded files

That would work, but let me propose another way to skin the cat.  tasksel can
be called with a "-q" option to queue the packages for a dselect-upgrade.  I
had simply added the -q before and relied upon a subsequent call to
dselect-upgrade to pull in the required packages, but this time I added a call
to the dselect-upgrade command to finish off the request.

Index: install_packages
===================================================================
RCS file: /cvs/debian-boot/fai/scripts/install_packages,v
retrieving revision 1.19
diff -u -B -r1.19 install_packages
--- install_packages    2001/11/16 16:04:26     1.19
+++ install_packages    2002/01/09 18:10:26
@@ -34,7 +34,7 @@
            install => 'apt-get -y --fix-missing install',
            remove  => 'apt-get -y --purge remove',
   "dselect-upgrade" => 'apt-get -y dselect-upgrade',
-         "taskinst" => 'tasksel -n install',
+         "taskinst" => 'tasksel -q -n install',
              "hold" => 'dpkg --set-selections',
 );
 
@@ -97,9 +97,13 @@
   }
 
   execute("$rootcmd $command{$type} $packlist") if $packlist;
+  
+  if ($type eq "taskint") {
+    execute ("rootcmd $command{\"dselect-upgrade\"}");
+  }
 }
 
-# remove prelaoded files
+# remove preloaded files
 foreach $entry (@preloadrmlist) {
   my ($url, $directory) = @$entry;
   $url =~ m#/([^/]+$)#;


Anyway, it's off to lunch with me.

-- 
Chad Walstrom <chewie at wookimus.net>                 | a.k.a. ^chewie
http://www.wookimus.net/                            | s.k.a. gunnarr
Get my public key, ICQ#, etc.  Send email w/the Subject: "get help"



More information about the linux-fai mailing list