[Libreoffice-commits] .: solenv/bin
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Aug 19 12:14:37 PDT 2012
solenv/bin/modules/installer/epmfile.pm | 16 ++++++-------
solenv/bin/modules/installer/systemactions.pm | 32 --------------------------
2 files changed, 8 insertions(+), 40 deletions(-)
New commits:
commit c55a340a992199c5eb2d8b9cbe2fea539c6f83aa
Author: Tim Retout <tim at retout.co.uk>
Date: Sun Aug 19 19:50:05 2012 +0100
installer: Replace remove_empty_directory with rmdir.
Change-Id: Ief3248e0b591a9216ac243fca38904366bab6391
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index 36fd78d..7d7da01 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 2607588..3c54ed1 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
#######################################################################
More information about the Libreoffice-commits
mailing list