Include CLEANUP => 1 during temp directory creation in perl scripts.

This commit is contained in:
Jimmy Berry 2017-09-27 08:36:23 -05:00
parent 4011159df4
commit 646fd936e0
2 changed files with 2 additions and 2 deletions

View File

@ -234,7 +234,7 @@ if (-d "$old") {
}
my $odir = getcwd;
my $tmpdir = tempdir( "obs-XXXXXXX", TMPDIR => 1 );
my $tmpdir = tempdir("obs-XXXXXXX", TMPDIR => 1, CLEANUP => 1);
chdir($dir) || die 'tempdir failed';
if (system("/usr/lib/obs/service/download_files","--enforceupstream", "yes", "--enforcelocal", "yes", "--outdir", $tmpdir)) {
print "Source URLs are not valid. Try \"osc service localrun download_files\"\n";

View File

@ -165,7 +165,7 @@ if (%torebuild) {
system("osc api -X POST '$api'");
}
my $pfile = tempdir() . "/packages"; # the filename is important ;(
my $pfile = tempdir(CLEANUP => 1) . "/packages"; # the filename is important ;(
sub mirror_repo($$$) {