summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSSetup/MetaPackager/smart.pm
diff options
context:
space:
mode:
authorOliver Tappe2007-07-01 22:28:50 +0200
committerOliver Tappe2007-07-01 22:28:50 +0200
commit6974fa8b0419bbd0711f79c8b78e07a9543810dd (patch)
tree25141f0f4d20ca8fdb1c845edf5b9ce4b24a6e98 /installer/OpenSLX/OSSetup/MetaPackager/smart.pm
parentTried to add Ubuntu 7.04 to the list of cloneable systems. (diff)
downloadcore-6974fa8b0419bbd0711f79c8b78e07a9543810dd.tar.gz
core-6974fa8b0419bbd0711f79c8b78e07a9543810dd.tar.xz
core-6974fa8b0419bbd0711f79c8b78e07a9543810dd.zip
* activated 'use warnings' to all modules and adjusted all occurences of
'use of uninitialized values', a couple of which might still show up * adjusted all code with respect to passing perlcritic level 4 and 5 git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1207 95ad53e4-c205-0410-b2fa-d234c58c8868
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, $!
+ );
+ }
}
}
}