Merge pull request #1152 from jberry-suse/perl-temp-cleanup

Include CLEANUP => 1 during temp directory creation in perl scripts.
This commit is contained in:
Max Lin 2017-09-28 16:32:23 +08:00 committed by GitHub
commit 3bbeacd75f
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($$$) {