summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorTim Retout <tim@retout.co.uk>2012-08-19 19:50:05 +0100
committerTim Retout <tim@retout.co.uk>2012-08-19 19:50:05 +0100
commitc55a340a992199c5eb2d8b9cbe2fea539c6f83aa (patch)
tree3de938417106e7837ea0b1692e5dcbf1abe1e1c3 /solenv/bin
parentfa98546caa64ff830c5fa91bc603f2685e99c64f (diff)
installer: Replace remove_empty_directory with rmdir.
Change-Id: Ief3248e0b591a9216ac243fca38904366bab6391
Diffstat (limited to 'solenv/bin')
-rw-r--r--solenv/bin/modules/installer/epmfile.pm16
-rw-r--r--solenv/bin/modules/installer/systemactions.pm32
2 files changed, 8 insertions, 40 deletions
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index 36fd78d397d5..7d7da01c3557 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -2602,14 +2602,14 @@ sub create_new_directory_structure
if ( $machine ne "" )
{
- installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/$machine");
- }
- installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/powerpc");
- installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/x86_64");
- installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/i586");
- installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/i386");
- installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS");
-
+ rmdir "$installer::globals::epmoutpath/RPMS/$machine";
+ }
+ rmdir "$installer::globals::epmoutpath/RPMS/powerpc";
+ rmdir "$installer::globals::epmoutpath/RPMS/x86_64";
+ rmdir "$installer::globals::epmoutpath/RPMS/i586";
+ rmdir "$installer::globals::epmoutpath/RPMS/i386";
+ rmdir "$installer::globals::epmoutpath/RPMS"
+ or warn "Could not remove RPMS dir: $!";
}
# Setting unix rights to "775" for $newdir ("RPMS" or "packages")
diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm
index 260758885ea7..3c54ed17148b 100644
--- a/solenv/bin/modules/installer/systemactions.pm
+++ b/solenv/bin/modules/installer/systemactions.pm
@@ -154,38 +154,6 @@ sub create_directory_with_privileges
}
}
-######################################################
-# Removing a new direcotory
-######################################################
-
-sub remove_empty_directory
-{
- my ($directory) = @_;
-
- my $returnvalue = 1;
-
- if (-d $directory)
- {
- my $systemcall = "rmdir $directory";
-
- $returnvalue = system($systemcall);
-
- my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not remove \"$directory\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- else
- {
- $infoline = "Success: Removed \"$directory\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- }
-}
-
#######################################################################
# Calculating the number of languages in the string
#######################################################################