From d5113273cf2cefd1db9942e4d743f455aa8f669a Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 10 Jul 2007 20:57:27 +0000 Subject: * more work towards perlcritic compliance, fixed the low-hanging fruit for level 4 git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1234 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/OpenSLX/OSExport/BlockDevice/AoE.pm | 2 ++ installer/OpenSLX/OSExport/BlockDevice/NBD.pm | 2 ++ installer/OpenSLX/OSExport/Distro/Any.pm | 1 + installer/OpenSLX/OSExport/Distro/Base.pm | 1 + installer/OpenSLX/OSExport/Distro/Debian.pm | 1 + installer/OpenSLX/OSExport/Distro/Fedora.pm | 1 + installer/OpenSLX/OSExport/Distro/Gentoo.pm | 1 + installer/OpenSLX/OSExport/Distro/SUSE.pm | 1 + installer/OpenSLX/OSExport/Distro/Ubuntu.pm | 1 + installer/OpenSLX/OSExport/Engine.pm | 7 ++++ installer/OpenSLX/OSExport/FileSystem/NFS.pm | 4 +++ installer/OpenSLX/OSExport/FileSystem/SquashFS.pm | 4 +++ installer/OpenSLX/OSSetup/Distro/Base.pm | 1 + installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm | 8 +++-- installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm | 8 +++-- installer/OpenSLX/OSSetup/Distro/Fedora_6.pm | 4 ++- .../OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm | 4 ++- installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm | 4 +++ .../OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm | 4 +++ installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm | 4 +++ .../OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm | 6 +++- installer/OpenSLX/OSSetup/Engine.pm | 37 ++++++++++++++++++++++ installer/OpenSLX/OSSetup/MetaPackager/Base.pm | 3 ++ installer/OpenSLX/OSSetup/MetaPackager/smart.pm | 5 +++ installer/OpenSLX/OSSetup/MetaPackager/yum.pm | 5 +++ installer/OpenSLX/OSSetup/Packager/Base.pm | 1 + installer/OpenSLX/OSSetup/Packager/rpm.pm | 6 +++- 27 files changed, 116 insertions(+), 10 deletions(-) (limited to 'installer') diff --git a/installer/OpenSLX/OSExport/BlockDevice/AoE.pm b/installer/OpenSLX/OSExport/BlockDevice/AoE.pm index 2113ef5c..b0439a6d 100644 --- a/installer/OpenSLX/OSExport/BlockDevice/AoE.pm +++ b/installer/OpenSLX/OSExport/BlockDevice/AoE.pm @@ -49,6 +49,7 @@ sub initialize $self->{'engine'} = $engine; $self->{'fs'} = $fs; + return; } sub getExportPort @@ -90,6 +91,7 @@ sub showExportConfigInfo "... (don't know how this is done yet)" ); print(('#' x 80) . "\n"); + return; } 1; diff --git a/installer/OpenSLX/OSExport/BlockDevice/NBD.pm b/installer/OpenSLX/OSExport/BlockDevice/NBD.pm index 89f10b66..1199a4dc 100644 --- a/installer/OpenSLX/OSExport/BlockDevice/NBD.pm +++ b/installer/OpenSLX/OSExport/BlockDevice/NBD.pm @@ -43,6 +43,7 @@ sub initialize $self->{'engine'} = $engine; $self->{'fs'} = $fs; + return; } sub getExportPort @@ -84,6 +85,7 @@ sub showExportConfigInfo "nbd-server $export->{port} $self->{fs}->{'export-path'} -r" ); print(('#' x 80) . "\n"); + return; } 1; diff --git a/installer/OpenSLX/OSExport/Distro/Any.pm b/installer/OpenSLX/OSExport/Distro/Any.pm index 976bbadf..f56673d8 100644 --- a/installer/OpenSLX/OSExport/Distro/Any.pm +++ b/installer/OpenSLX/OSExport/Distro/Any.pm @@ -54,6 +54,7 @@ sub initDistroInfo + /lib/modules/*/misc/vmnet.o + /lib/modules/*/misc/vmmon.o "; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Distro/Base.pm b/installer/OpenSLX/OSExport/Distro/Base.pm index f1986ee5..67d18951 100644 --- a/installer/OpenSLX/OSExport/Distro/Base.pm +++ b/installer/OpenSLX/OSExport/Distro/Base.pm @@ -37,6 +37,7 @@ sub initialize $self->{'engine'} = $engine; $self->initDistroInfo(); + return; } sub initDistroInfo diff --git a/installer/OpenSLX/OSExport/Distro/Debian.pm b/installer/OpenSLX/OSExport/Distro/Debian.pm index 5f161902..5ff7216a 100644 --- a/installer/OpenSLX/OSExport/Distro/Debian.pm +++ b/installer/OpenSLX/OSExport/Distro/Debian.pm @@ -48,6 +48,7 @@ sub initDistroInfo - /boot/initrd* - /boot/grub "; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Distro/Fedora.pm b/installer/OpenSLX/OSExport/Distro/Fedora.pm index 0ef3e028..3e5d1f31 100644 --- a/installer/OpenSLX/OSExport/Distro/Fedora.pm +++ b/installer/OpenSLX/OSExport/Distro/Fedora.pm @@ -54,6 +54,7 @@ sub initDistroInfo - *.rpmsave - *.rpmnew "; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Distro/Gentoo.pm b/installer/OpenSLX/OSExport/Distro/Gentoo.pm index 4d908650..e4bcd6db 100644 --- a/installer/OpenSLX/OSExport/Distro/Gentoo.pm +++ b/installer/OpenSLX/OSExport/Distro/Gentoo.pm @@ -48,6 +48,7 @@ sub initDistroInfo - /boot/initrd* - /boot/grub "; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Distro/SUSE.pm b/installer/OpenSLX/OSExport/Distro/SUSE.pm index 1f826159..3dbf6e76 100644 --- a/installer/OpenSLX/OSExport/Distro/SUSE.pm +++ b/installer/OpenSLX/OSExport/Distro/SUSE.pm @@ -96,6 +96,7 @@ sub initDistroInfo - *.rpmnew - *.YaST2save "; + return; } 1; diff --git a/installer/OpenSLX/OSExport/Distro/Ubuntu.pm b/installer/OpenSLX/OSExport/Distro/Ubuntu.pm index 8dbaae9e..f436c533 100644 --- a/installer/OpenSLX/OSExport/Distro/Ubuntu.pm +++ b/installer/OpenSLX/OSExport/Distro/Ubuntu.pm @@ -50,6 +50,7 @@ sub initDistroInfo - /boot/initrd* - /boot/grub "; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSExport/Engine.pm b/installer/OpenSLX/OSExport/Engine.pm index 31a71b5a..ad0c0c0a 100644 --- a/installer/OpenSLX/OSExport/Engine.pm +++ b/installer/OpenSLX/OSExport/Engine.pm @@ -86,6 +86,7 @@ sub initializeFromExisting $self->_initialize($vendorOS->{name}, $vendorOS->{id}, $export->{name}, $export->{type}); + return; } sub initializeForNew @@ -108,6 +109,7 @@ sub initializeForNew $self->_initialize($vendorOS->{name}, $vendorOS->{id}, $exportName, $exportType); + return; } sub exportVendorOS @@ -130,6 +132,7 @@ sub exportVendorOS ) ); $self->_addExportToConfigDB(); + return; } sub purgeExport @@ -146,6 +149,7 @@ sub purgeExport ); } $self->_removeExportFromConfigDB(); + return; } sub generateExportURI @@ -238,6 +242,7 @@ sub _initialize $exporter->{'export-path'} ) ); + return; } sub _addExportToConfigDB @@ -285,6 +290,7 @@ sub _addExportToConfigDB } $openslxDB->disconnect(); + return; } sub _removeExportFromConfigDB @@ -325,6 +331,7 @@ sub _removeExportFromConfigDB } $openslxDB->disconnect(); + return; } 1; diff --git a/installer/OpenSLX/OSExport/FileSystem/NFS.pm b/installer/OpenSLX/OSExport/FileSystem/NFS.pm index 0073d55c..878b956b 100644 --- a/installer/OpenSLX/OSExport/FileSystem/NFS.pm +++ b/installer/OpenSLX/OSExport/FileSystem/NFS.pm @@ -43,6 +43,7 @@ sub initialize $self->{'engine'} = $engine; my $exportBasePath = "$openslxConfig{'public-path'}/export"; $self->{'export-path'} = "$exportBasePath/nfs/$engine->{'vendor-os-name'}"; + return; } sub exportVendorOS @@ -52,6 +53,7 @@ sub exportVendorOS my $target = $self->{'export-path'}; $self->_copyViaRsync($source, $target); + return; } sub purgeExport @@ -101,6 +103,7 @@ sub showExportConfigInfo # TODO : add something a bit more clever here... # my $exports = slurpFile("/etc/exports"); + return; } ################################################################################ @@ -126,6 +129,7 @@ sub _copyViaRsync close($rsyncFH) or die _tr("unable to export to target '%s', giving up! (%s)", $target, $!); + return; } sub _determineIncludeExcludeList diff --git a/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm b/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm index 6aeb9cd2..82c4fdda 100644 --- a/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm +++ b/installer/OpenSLX/OSExport/FileSystem/SquashFS.pm @@ -45,6 +45,7 @@ sub initialize $self->{'block-device'} = $blockDevice; my $exportBasePath = "$openslxConfig{'public-path'}/export"; $self->{'export-path'} = "$exportBasePath/sqfs/$engine->{'vendor-os-name'}"; + return; } sub exportVendorOS @@ -74,6 +75,7 @@ sub exportVendorOS $self->_createSquashFS($source, $target, $includeExcludeList); } $self->_addBlockDeviceTagToExport($target); + return; } sub purgeExport @@ -176,6 +178,7 @@ sub showExportConfigInfo my $export = shift; $self->{'block-device'}->showExportConfigInfo($export); + return; } ################################################################################ @@ -317,6 +320,7 @@ sub _addBlockDeviceTagToExport my $tagName = "$target" . '@' . lc($self->{'block-device'}->{name}); linkFile(basename($target), $tagName); + return; } sub _removeBlockDeviceTagFromExport diff --git a/installer/OpenSLX/OSSetup/Distro/Base.pm b/installer/OpenSLX/OSSetup/Distro/Base.pm index e0cb5fba..0cea7ab6 100644 --- a/installer/OpenSLX/OSSetup/Distro/Base.pm +++ b/installer/OpenSLX/OSSetup/Distro/Base.pm @@ -109,6 +109,7 @@ sub initialize "; $self->initDistroInfo(); + return; } sub fixPrerequiredFiles diff --git a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm index 24ad00a4..30882c8d 100644 --- a/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm +++ b/installer/OpenSLX/OSSetup/Distro/Debian_3_1.pm @@ -40,14 +40,15 @@ sub initialize $self->SUPER::initialize($engine); $self->{'packager-type'} = 'dpkg'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'apt'; - $self->{'stage1c-faked-files'} = [ - ]; + $self->{'stage1c-faked-files'} = []; + return; } sub fixPrerequiredFiles { my $self = shift; my $stage1cDir = shift; + return; } sub initDistroInfo @@ -80,7 +81,8 @@ sub initDistroInfo $self->{config}->{'selection'} = { 'default' => "list any packagenames here", - } + }; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm b/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm index f4e8a6e4..23ca8a77 100644 --- a/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm +++ b/installer/OpenSLX/OSSetup/Distro/Debian_4_0.pm @@ -40,14 +40,15 @@ sub initialize $self->SUPER::initialize($engine); $self->{'packager-type'} = 'dpkg'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'apt'; - $self->{'stage1c-faked-files'} = [ - ]; + $self->{'stage1c-faked-files'} = []; + return; } sub fixPrerequiredFiles { my $self = shift; my $stage1cDir = shift; + return; } sub initDistroInfo @@ -80,7 +81,8 @@ sub initDistroInfo $self->{config}->{'selection'} = { 'default' => "list any packagenames here", - } + }; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Distro/Fedora_6.pm b/installer/OpenSLX/OSSetup/Distro/Fedora_6.pm index 03f7116a..6b384ebd 100644 --- a/installer/OpenSLX/OSSetup/Distro/Fedora_6.pm +++ b/installer/OpenSLX/OSSetup/Distro/Fedora_6.pm @@ -44,6 +44,7 @@ sub initialize '/etc/fstab', '/etc/mtab', ]; + return; } sub initDistroInfo @@ -167,7 +168,8 @@ sub initDistroInfo $self->{config}->{'selection'} = { 'default' => "", - } + }; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm b/installer/OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm index 46c43e37..a4addcdb 100644 --- a/installer/OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm +++ b/installer/OpenSLX/OSSetup/Distro/Fedora_6_x86_64.pm @@ -44,6 +44,7 @@ sub initialize '/etc/fstab', '/etc/mtab', ]; + return; } sub initDistroInfo @@ -167,7 +168,8 @@ sub initDistroInfo $self->{config}->{'selection'} = { 'default' => "", - } + }; + return; } 1; diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm b/installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm index 819bbb95..b25b167d 100644 --- a/installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm +++ b/installer/OpenSLX/OSSetup/Distro/SUSE_10_1.pm @@ -41,6 +41,7 @@ sub initialize $self->{'packager-type'} = 'rpm'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; $ENV{YAST_IS_RUNNING} = "instsys"; + return; } sub fixPrerequiredFiles @@ -50,6 +51,7 @@ sub fixPrerequiredFiles chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", "$stage1cDir/etc/shadow"); + return; } sub updateDistroConfig @@ -65,6 +67,7 @@ sub updateDistroConfig die _tr("unable to run SuSEconfig (%s)", $!); } $self->SUPER::updateDistroConfig(); + return; } sub initDistroInfo @@ -1054,6 +1057,7 @@ sub initDistroInfo zvbi ", }; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm b/installer/OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm index f80bca32..91210146 100644 --- a/installer/OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm +++ b/installer/OpenSLX/OSSetup/Distro/SUSE_10_1_x86_64.pm @@ -41,6 +41,7 @@ sub initialize $self->{'packager-type'} = 'rpm'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; $ENV{YAST_IS_RUNNING} = "instsys"; + return; } sub fixPrerequiredFiles @@ -50,6 +51,7 @@ sub fixPrerequiredFiles chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", "$stage1cDir/etc/shadow"); + return; } sub updateDistroConfig @@ -65,6 +67,7 @@ sub updateDistroConfig die _tr("unable to run SuSEconfig (%s)", $!); } $self->SUPER::updateDistroConfig(); + return; } sub initDistroInfo @@ -1055,6 +1058,7 @@ sub initDistroInfo zvbi ", }; + return; } 1; diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm b/installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm index 497980cb..71f4b57b 100644 --- a/installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm +++ b/installer/OpenSLX/OSSetup/Distro/SUSE_10_2.pm @@ -39,6 +39,7 @@ sub initialize $self->{'packager-type'} = 'rpm'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; $ENV{YAST_IS_RUNNING} = "instsys"; + return; } sub fixPrerequiredFiles @@ -48,6 +49,7 @@ sub fixPrerequiredFiles chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", "$stage1cDir/etc/shadow"); + return; } sub updateDistroConfig @@ -63,6 +65,7 @@ sub updateDistroConfig die _tr("unable to run SuSEconfig (%s)", $!); } $self->SUPER::updateDistroConfig(); + return; } sub initDistroInfo @@ -1140,6 +1143,7 @@ sub initDistroInfo zvbi ", }; + return; } 1; diff --git a/installer/OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm b/installer/OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm index 778d58af..85715e40 100644 --- a/installer/OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm +++ b/installer/OpenSLX/OSSetup/Distro/SUSE_10_2_x86_64.pm @@ -41,6 +41,7 @@ sub initialize $self->{'packager-type'} = 'rpm'; $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'smart'; $ENV{YAST_IS_RUNNING} = "instsys"; + return; } sub fixPrerequiredFiles @@ -50,6 +51,7 @@ sub fixPrerequiredFiles chown(0, 0, "$stage1cDir/etc/group", "$stage1cDir/etc/passwd", "$stage1cDir/etc/shadow"); + return; } sub updateDistroConfig @@ -65,6 +67,7 @@ sub updateDistroConfig die _tr("unable to run SuSEconfig (%s)", $!); } $self->SUPER::updateDistroConfig(); + return; } sub initDistroInfo @@ -395,7 +398,8 @@ sub initDistroInfo zisofs-tools zsh ", - } + }; + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 6846eef6..82ab6163 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -111,6 +111,7 @@ sub DESTROY kill TERM => $pid; } } + return; } sub initialize @@ -206,6 +207,7 @@ sub initialize $self->createPackager(); $self->createMetaPackager(); } + return; } sub installVendorOS @@ -264,6 +266,7 @@ sub installVendorOS $self->touchVendorOS(); $self->addInstalledVendorOSToConfigDB(); + return; } sub cloneVendorOS @@ -346,6 +349,7 @@ sub cloneVendorOS $self->touchVendorOS(); $self->addInstalledVendorOSToConfigDB(); + return; } sub updateVendorOS @@ -371,6 +375,7 @@ sub updateVendorOS 0, _tr("Vendor-OS '%s' updated succesfully.\n", $self->{'vendor-os-name'}) ); + return; } sub startChrootedShellForVendorOS @@ -401,6 +406,7 @@ sub startChrootedShellForVendorOS $self->{'vendor-os-name'} ) ); + return; } sub callChrootedFunctionForVendorOS @@ -432,6 +438,7 @@ sub callChrootedFunctionForVendorOS $self->{'vendor-os-name'} ) ); + return; } sub removeVendorOS @@ -458,6 +465,7 @@ sub removeVendorOS ); } $self->removeVendorOSFromConfigDB(); + return; } sub addInstalledVendorOSToConfigDB @@ -517,6 +525,7 @@ sub addInstalledVendorOSToConfigDB } $openslxDB->disconnect(); + return; } sub removeVendorOSFromConfigDB @@ -563,6 +572,7 @@ sub removeVendorOSFromConfigDB } $openslxDB->disconnect(); + return; } ################################################################################ @@ -643,6 +653,7 @@ sub readDistroInfo } } } + return; } sub createVendorOSPath @@ -653,6 +664,7 @@ sub createVendorOSPath die _tr("unable to create directory '%s', giving up! (%s)\n", $self->{'vendor-os-path'}, $!); } + return; } sub touchVendorOS @@ -663,6 +675,7 @@ sub touchVendorOS # 'age' of the vendor-OS when trying to determine whether or not we # need to re-export this vendor-OS: slxsystem("touch $self->{'vendor-os-path'}"); + return; } sub createPackager @@ -674,6 +687,7 @@ sub createPackager my $packager = instantiateClass($packagerClass); $packager->initialize($self); $self->{'packager'} = $packager; + return; } sub createMetaPackager @@ -695,6 +709,7 @@ sub createMetaPackager my $metaPackager = instantiateClass($metaPackagerClass); $metaPackager->initialize($self); $self->{'meta-packager'} = $metaPackager; + return; } sub sortRepositoryURLs @@ -812,6 +827,7 @@ sub startLocalURLServersAsNeeded $port++; } } + return; } sub setupStage1A @@ -837,6 +853,7 @@ sub setupStage1A $self->stage1A_copyPrerequiredFiles(); $self->stage1A_copyTrustedPackageKeys(); $self->stage1A_createRequiredFiles(); + return; } sub stage1A_createBusyboxEnvironment @@ -892,6 +909,7 @@ sub stage1A_createBusyboxEnvironment } $self->stage1A_setupResolver($libcFolder); + return; } sub stage1A_setupResolver @@ -911,6 +929,7 @@ sub stage1A_setupResolver my $stage1cDir = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/$self->{'stage1cSubdir'}"; copyFile('/etc/resolv.conf', "$stage1cDir/etc"); + return; } sub stage1A_copyPrerequiredFiles @@ -933,6 +952,7 @@ sub stage1A_copyPrerequiredFiles ); } $self->{distro}->fixPrerequiredFiles($stage1cDir); + return; } sub stage1A_copyTrustedPackageKeys @@ -964,6 +984,7 @@ sub stage1A_copyTrustedPackageKeys copyFile("$keyDir/pubring.gpg", "$stage1cDir/usr/lib/rpm/gnupg"); } } + return; } sub stage1A_createRequiredFiles @@ -992,6 +1013,7 @@ sub stage1A_createRequiredFiles "unable to create node '%s' (%s)\n", "$stage1cDir/dev/null", $! ); } + return; } sub setupStage1B @@ -1000,6 +1022,7 @@ sub setupStage1B vlog(1, "setting up stage1b for $self->{'vendor-os-name'}..."); $self->stage1B_chrootAndBootstrap(); + return; } sub stage1B_chrootAndBootstrap @@ -1039,6 +1062,7 @@ sub stage1B_chrootAndBootstrap my @bootstrapPkgs = $self->downloadBaseFiles(\@pkgs); my @allPkgs = (@prereqPkgs, @bootstrapPrereqPkgs, @bootstrapPkgs); $self->{'bootstrap-packages'} = \@allPkgs; + return; } sub setupStage1C @@ -1047,6 +1071,7 @@ sub setupStage1C vlog(1, "setting up stage1c for $self->{'vendor-os-name'}..."); $self->stage1C_chrootAndInstallBasicVendorOS(); + return; } sub stage1C_chrootAndInstallBasicVendorOS @@ -1080,6 +1105,7 @@ sub stage1C_chrootAndInstallBasicVendorOS $self->{packager}->installPackages( $self->{'bootstrap-packages'}, $stage1cDir ); + return; } sub stage1C_cleanupBasicVendorOS @@ -1100,6 +1126,7 @@ sub stage1C_cleanupBasicVendorOS $self->{stage1aDir}, $! ); } + return; } sub setupStage1D @@ -1113,6 +1140,7 @@ sub setupStage1D $self->stage1D_setupPackageSources(); $self->stage1D_updateBasicVendorOS(); $self->stage1D_installPackageSelection(); + return; } sub updateStage1D @@ -1124,6 +1152,7 @@ sub updateStage1D chrootInto($self->{'vendor-os-path'}); $self->stage1D_updateBasicVendorOS(); + return; } sub startChrootedShellInStage1D @@ -1144,6 +1173,7 @@ sub startChrootedShellInStage1D $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); + return; } sub callChrootedFunctionInStage1D @@ -1160,6 +1190,7 @@ sub callChrootedFunctionInStage1D $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); + return; } sub stage1D_setupPackageSources @@ -1176,6 +1207,7 @@ sub stage1D_setupPackageSources vlog(2, "setting up package source $rk..."); $self->{'meta-packager'}->setupPackageSource($rk, $repo, $excludeList); } + return; } sub stage1D_updateBasicVendorOS @@ -1187,6 +1219,7 @@ sub stage1D_updateBasicVendorOS $self->{'meta-packager'}->updateBasicVendorOS(); $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); + return; } sub stage1D_installPackageSelection @@ -1223,6 +1256,7 @@ sub stage1D_installPackageSelection } $self->{'distro'}->updateDistroConfig(); $self->{'meta-packager'}->finishSession(); + return; } sub clone_fetchSource @@ -1255,6 +1289,7 @@ sub clone_fetchSource or croak _tr( "unable to clone from source '%s', giving up! (%s)\n", $source, $! ); + return; } sub clone_determineIncludeExcludeList @@ -1292,6 +1327,7 @@ sub changePersonalityIfNeeded syscall &SYS_personality, PER_LINUX32(); } + return; } sub hostIs64Bit @@ -1332,6 +1368,7 @@ sub chrootInto or die _tr("unable to chroot into '%s' (%s)\n", $osDir, $!); $ENV{PATH} = "/bin:/sbin:/usr/bin:/usr/sbin"; + return; } 1; diff --git a/installer/OpenSLX/OSSetup/MetaPackager/Base.pm b/installer/OpenSLX/OSSetup/MetaPackager/Base.pm index cfcb013c..16aa290d 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/Base.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/Base.pm @@ -35,6 +35,7 @@ sub initialize my $engine = shift; $self->{'engine'} = $engine; + return; } sub initPackageSources @@ -64,6 +65,7 @@ sub startSession $self->{engine}->{distro}->startSession(); # allow vendor specific extensions + return; } sub finishSession @@ -76,6 +78,7 @@ sub finishSession system('umount /proc 2>/dev/null'); removeCleanupFunction('slxos-setup::meta-packager'); + return; } 1; diff --git a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm index 64773d17..3b266ee7 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/smart.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/smart.pm @@ -40,6 +40,7 @@ sub initialize $self->SUPER::initialize($engine); $ENV{LC_ALL} = 'POSIX'; + return; } sub initPackageSources @@ -51,6 +52,7 @@ sub initPackageSources if (slxsystem("smart channel -y --remove-all")) { die _tr("unable to remove existing channels (%s)\n", $!); } + return; } sub setupPackageSource @@ -87,6 +89,7 @@ sub setupPackageSource } } } + return; } sub installSelection @@ -100,6 +103,7 @@ sub installSelection if (slxsystem("smart install -y $pkgSelection")) { die _tr("unable to install selection (%s)\n", $!); } + return; } sub updateBasicVendorOS @@ -113,6 +117,7 @@ sub updateBasicVendorOS } die _tr("unable to update this vendor-os (%s)\n", $!); } + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm index 6dfe9523..77ac11d1 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm @@ -40,6 +40,7 @@ sub initialize $self->SUPER::initialize($engine); $ENV{LC_ALL} = 'POSIX'; + return; } sub initPackageSources @@ -48,6 +49,7 @@ sub initPackageSources slxsystem("rm -f /etc/yum.repos.d/*"); slxsystem("mkdir -p /etc/yum.repos.d"); + return; } sub setupPackageSource @@ -74,6 +76,7 @@ sub setupPackageSource } my $repoFile = "/etc/yum.repos.d/$repoName.repo"; spitFile($repoFile, "$repoDescr\nexclude=$excludeList\n"); + return; } sub installSelection @@ -84,6 +87,7 @@ sub installSelection if (slxsystem("yum -y install $pkgSelection")) { die _tr("unable to install selection (%s)\n", $!); } + return; } sub updateBasicVendorOS @@ -97,6 +101,7 @@ sub updateBasicVendorOS } die _tr("unable to update this vendor-os (%s)\n", $!); } + return; } 1; \ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Packager/Base.pm b/installer/OpenSLX/OSSetup/Packager/Base.pm index 4ca24621..34927821 100644 --- a/installer/OpenSLX/OSSetup/Packager/Base.pm +++ b/installer/OpenSLX/OSSetup/Packager/Base.pm @@ -34,6 +34,7 @@ sub initialize my $distro = shift; $self->{'distro'} = $distro; + return; } sub unpackPackages diff --git a/installer/OpenSLX/OSSetup/Packager/rpm.pm b/installer/OpenSLX/OSSetup/Packager/rpm.pm index 234ab404..ef254084 100644 --- a/installer/OpenSLX/OSSetup/Packager/rpm.pm +++ b/installer/OpenSLX/OSSetup/Packager/rpm.pm @@ -45,6 +45,7 @@ sub unpackPackages # doesn't crash anymore... (needs busybox update, I suppose) } } + return; } sub importTrustedPackageKeys @@ -61,6 +62,7 @@ sub importTrustedPackageKeys die _tr("unable to import package key <%s> (%s)\n", $keyFile, $!); } } + return; } sub installPrerequiredPackages @@ -76,6 +78,7 @@ sub installPrerequiredPackages die _tr("error during prerequired-package-installation (%s)\n", $!); } slxsystem("rm", "-rf", "$finalPath/var/lib/rpm"); + return; } sub installPackages @@ -89,6 +92,7 @@ sub installPackages if (slxsystem("rpm", "--root=$finalPath", "-ivh", @$pkgs)) { die _tr("error during package-installation (%s)\n", $!); } + return; } sub getInstalledPackages @@ -100,4 +104,4 @@ sub getInstalledPackages return split "\n", $pkgList; } -1; \ No newline at end of file +1; -- cgit v1.2.3-55-g7522