| 25 |
# MA 02111-1307, USA. |
# MA 02111-1307, USA. |
| 26 |
#********************************************************************* |
#********************************************************************* |
| 27 |
|
|
| 28 |
my $version = "Version 3.0, 27-march-2006"; |
my $version = "Version 3.1, 28-march-2006"; |
| 29 |
$0=~ s#.+/##; # remove path from program name |
$0=~ s#.+/##; # remove path from program name |
| 30 |
|
|
| 31 |
# import variables: $verbose, $MAXPACKAGES, $classes, $FAI, $FAI_ROOT |
# import variables: $verbose, $MAXPACKAGES, $classes, $FAI, $FAI_ROOT |
| 131 |
# call apt-get or tasksel for each type of command whith the list of packages |
# call apt-get or tasksel for each type of command whith the list of packages |
| 132 |
foreach $atype (@commands) { |
foreach $atype (@commands) { |
| 133 |
|
|
|
if ($atype eq "urpmi") { # use this so clean is not called |
|
|
execute("$rootcmd $command{urpmi}") unless $listonly; |
|
|
next; |
|
|
} |
|
|
|
|
| 134 |
if ($atype eq "clean") { |
if ($atype eq "clean") { |
| 135 |
execute("$rootcmd $command{clean}") unless $listonly; |
execute("$rootcmd $command{clean}") unless $listonly; |
| 136 |
next; |
next; |
| 146 |
|
|
| 147 |
my $packlist = join(' ',@{$list{$atype}}); |
my $packlist = join(' ',@{$list{$atype}}); |
| 148 |
|
|
| 149 |
|
if ($atype eq "urpmi") { # use this so clean is not called |
| 150 |
|
execute("$rootcmd $command{urpmi}") if $packlist; |
| 151 |
|
next; |
| 152 |
|
} |
| 153 |
|
|
| 154 |
if ($atype eq "hold") { |
if ($atype eq "hold") { |
| 155 |
my $hold = join " hold\n", @{$list{hold}}; |
my $hold = join " hold\n", @{$list{hold}}; |
| 156 |
$hold .= " hold\n"; |
$hold .= " hold\n"; |