This is an automated email from the ASF dual-hosted git repository. ardovm pushed a commit to branch ardovm/rpmbuild_clean in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 9ea00ca872bf4b7960816d80b8d57fd131e3e587 Author: Arrigo Marchiori <[email protected]> AuthorDate: Sat Nov 21 09:35:06 2026 +0100 Clean up unneeded directories created by rpmbuild(8) --- main/solenv/bin/modules/installer/epmfile.pm | 45 +++++++++++----------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/main/solenv/bin/modules/installer/epmfile.pm b/main/solenv/bin/modules/installer/epmfile.pm index 76f5b82ce7..60be036546 100644 --- a/main/solenv/bin/modules/installer/epmfile.pm +++ b/main/solenv/bin/modules/installer/epmfile.pm @@ -2656,34 +2656,23 @@ sub remove_temporary_epm_files system($systemcall); # ignoring the return value $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall); - # removing the directory "buildroot" - - my $removedir = $epmdir . "buildroot"; - - $systemcall = "rm -rf $removedir"; - - $installer::logger::Info->printf("... %s ...\n", $systemcall); - - my $returnvalue = system($systemcall); - - $removedir = $epmdir . "BUILD"; - - $systemcall = "rm -rf $removedir"; - - $installer::logger::Info->printf("... %s ...\n", $systemcall); - - $returnvalue = system($systemcall); - - $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall); - - if ($returnvalue) - { - $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall); - } - else - { - $installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall); - } + # removing the directory "buildroot" and other directories generated by rpmbuild + + foreach my $d ("buildroot", "BUILD", "BUILDROOT", "SRPMS") { + my $removedir = $epmdir . $d; + $systemcall = "rm -rf $removedir"; + $installer::logger::Info->printf("... %s ...\n", $systemcall); + my $returnvalue = system($systemcall); + $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall); + if ($returnvalue) + { + $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", $systemcall); + } + else + { + $installer::logger::Lang->printf("Success: Executed \"%s\" successfully!\n", $systemcall); + } + } } }
