[Fai-commit] r4439 - trunk/bin

lange at alioth.debian.org lange at alioth.debian.org
Thu Jul 12 15:34:56 UTC 2007


Author: lange
Date: 2007-07-12 15:34:56 +0000 (Thu, 12 Jul 2007)
New Revision: 4439

Modified:
   trunk/bin/install_packages
Log:
add smart package manager support


Modified: trunk/bin/install_packages
===================================================================
--- trunk/bin/install_packages	2007-07-11 22:07:02 UTC (rev 4438)
+++ trunk/bin/install_packages	2007-07-12 15:34:56 UTC (rev 4439)
@@ -66,7 +66,7 @@
 
 my $aptopt='-y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"';
 
- at commands = qw/y2i y2r yast rpmr urpmi urpme yumgroup yumi yumr hold taskrm taskinst clean aptitude aptitude-r install unpack remove dselect-upgrade/;
+ at commands = qw/y2i y2r yast rpmr urpmi urpme yumgroup yumi yumr smarti smartr hold taskrm taskinst clean aptitude aptitude-r install unpack remove dselect-upgrade/;
 %command = (
           "install" => "apt-get $aptopt --fix-missing install",
     "inst-internal" => "apt-get $aptopt --fix-missing -s install",
@@ -91,6 +91,9 @@
 	     "y2r"  => "y2pmsh remove",
 	     "yast" => "yast -i",
 	     "rpmr" => "rpm -e",
+             smarti => "smart install -y",
+             smartr => "smart remove -y",
+             smartc => "smart clean",
 );
 
 getopts('dhvlLm:p:nN');
@@ -131,9 +134,14 @@
 }
 
 # check if any Debian related commands/types are used in package_config
-my @debiantypes= qw/taskinst aptitude aptitude-r install remove dselect-upgrade/;
+my @debiantypes= qw/taskinst aptitude aptitude-r install remove dselect-upgrade smarti/;
 foreach my $dt (@debiantypes) {
-  $types{$dt} and $hasdebian=1,last;
+  $types{$dt} and $hasdebian=1;
+  if ($types{$dt} eq 'smarti') {
+    $command{clean} = $command{smartc};
+    $command{pending} = "true";
+    $command{dpkgc} = "true";
+  }
 }
 
 # get files which must exist before installing packages
@@ -357,6 +365,12 @@
     return;
   }
 
+  # no package name checking when using smart
+  if ($atype eq "smarti" || $atype eq "smartr") {
+    @known=@complete;
+    return;
+  }
+
   # ignore packages ending with - when using -d
   @complete = grep {!/-$/} @complete if $opt_d;
 




More information about the Fai-commit mailing list