Kaydet (Commit) c55a340a authored tarafından Tim Retout's avatar Tim Retout

installer: Replace remove_empty_directory with rmdir.

Change-Id: Ief3248e0b591a9216ac243fca38904366bab6391
üst fa98546c
......@@ -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")
......
......@@ -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
#######################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment