summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
diff options
context:
space:
mode:
authorOliver Tappe2007-07-28 22:38:11 +0200
committerOliver Tappe2007-07-28 22:38:11 +0200
commit102f63c43b0e32622bb5bf83a84cdac67174f539 (patch)
treeebd5ad2f8c50bca4e8cc38140ae55ee8071bf39c /installer/OpenSLX/OSSetup/MetaPackager/smart.pm
parent* changed several class interfaces as a result of trying to integrate support (diff)
downloadcore-102f63c43b0e32622bb5bf83a84cdac67174f539.tar.gz
core-102f63c43b0e32622bb5bf83a84cdac67174f539.tar.xz
core-102f63c43b0e32622bb5bf83a84cdac67174f539.zip
* finished installation support for Debian-etch, Debian-sarge and Ubuntu
are nearly done (Ubuntu still missing a kernel ...) * some more refactorings to accommodate Debian-support git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1282 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSSetup/MetaPackager/smart.pm')
-rw-r--r--installer/OpenSLX/OSSetup/MetaPackager/smart.pm37
1 files changed, 15 insertions, 22 deletions
diff --git a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
index 5303a50a..21fe6d92 100644
--- a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
+++ b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
@@ -33,22 +33,14 @@ sub new
return bless $self, $class;
}
-sub initialize
+sub initPackageSources
{
my $self = shift;
- my $engine = shift;
- $self->SUPER::initialize($engine);
$ENV{LC_ALL} = 'POSIX';
- return;
-}
-
-sub initPackageSources
-{
- my $self = shift;
+ # remove any existing channels
slxsystem("rm -f /etc/smart/channels/*");
- # remove channel if it already exists
if (slxsystem("smart channel -y --remove-all")) {
die _tr("unable to remove existing channels (%s)\n", $!);
}
@@ -74,19 +66,20 @@ sub setupPackageSource
if (slxsystem("smart channel -y --add $repoDescr")) {
die _tr("unable to add channel '%s' (%s)\n", $repoName, $!);
}
+
my $avoidMirrors = $repoInfo->{'avoid-mirrors'} || 0;
- unless ($ENV{SLX_NO_MIRRORS} || $avoidMirrors) {
- my $mirrorDescr;
- foreach my $mirrorURL (@$repoURLs) {
- $mirrorDescr .= " --add $baseURL$repoSubdir $mirrorURL$repoSubdir";
- }
- if (defined $mirrorDescr) {
- if (slxsystem("smart mirror $mirrorDescr")) {
- die _tr(
- "unable to add mirrors for channel '%s' (%s)\n",
- $repoName, $!
- );
- }
+ return if $avoidMirrors;
+
+ my $mirrorDescr;
+ foreach my $mirrorURL (@$repoURLs) {
+ $mirrorDescr .= " --add $baseURL$repoSubdir $mirrorURL$repoSubdir";
+ }
+ if (defined $mirrorDescr) {
+ if (slxsystem("smart mirror $mirrorDescr")) {
+ die _tr(
+ "unable to add mirrors for channel '%s' (%s)\n",
+ $repoName, $!
+ );
}
}
return;