summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
diff options
context:
space:
mode:
Diffstat (limited to 'installer/OpenSLX/OSSetup/MetaPackager/smart.pm')
-rw-r--r--installer/OpenSLX/OSSetup/MetaPackager/smart.pm20
1 files changed, 12 insertions, 8 deletions
diff --git a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
index bef44ddc..6e411a89 100644
--- a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
+++ b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
@@ -13,14 +13,13 @@
# -----------------------------------------------------------------------------
package OpenSLX::OSSetup::MetaPackager::smart;
-use vars qw($VERSION);
+use strict;
+use warnings;
+
use base qw(OpenSLX::OSSetup::MetaPackager::Base);
-$VERSION = 1.01; # API-version . implementation-version
-use strict;
-use Carp;
use OpenSLX::Basics;
-use OpenSLX::OSSetup::MetaPackager::Base 1;
+use OpenSLX::Utils;
################################################################################
### implementation
@@ -61,7 +60,7 @@ sub setupPackageSource
my $repoInfo = shift;
my $excludeList = shift;
- my $repoSubdir;
+ my $repoSubdir = '';
if (length($repoInfo->{'repo-subdir'})) {
$repoSubdir = "/$repoInfo->{'repo-subdir'}";
}
@@ -78,8 +77,13 @@ sub setupPackageSource
foreach my $mirrorURL (@$repoURLs) {
$mirrorDescr .= " --add $baseURL$repoSubdir $mirrorURL$repoSubdir";
}
- if (slxsystem("smart mirror $mirrorDescr")) {
- die _tr("unable to add mirrors for channel '%s' (%s)\n", $repoName, $!);
+ if (defined $mirrorDescr) {
+ if (slxsystem("smart mirror $mirrorDescr")) {
+ die _tr(
+ "unable to add mirrors for channel '%s' (%s)\n",
+ $repoName, $!
+ );
+ }
}
}
}