diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-10-24 21:58:13 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-10-24 21:58:13 +0000 |
commit | d5def04a105732549b5041df2f6814db76560c66 (patch) | |
tree | 39d42bceb567a5c71a34e0657789c60cab4215b5 | |
parent | a8508f7db09985074f7990725996cb5a0b6e48f3 (diff) | |
download | rpmdrake-d5def04a105732549b5041df2f6814db76560c66.tar rpmdrake-d5def04a105732549b5041df2f6814db76560c66.tar.gz rpmdrake-d5def04a105732549b5041df2f6814db76560c66.tar.bz2 rpmdrake-d5def04a105732549b5041df2f6814db76560c66.tar.xz rpmdrake-d5def04a105732549b5041df2f6814db76560c66.zip |
(extract_header) try harder to create a temporary directory (mktemp
sometimes failed)
-rwxr-xr-x | rpmdrake | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -471,8 +471,13 @@ sub extract_header { warn "Warning, hdlist seems corrupted\n"; goto header_non_available; }; - my $headersdir = chomp_(`mktemp -d /tmp/rpmdrake.XXXXXX`); - -d $headersdir or die "Could not create temporary directory"; + my ($headersdir, $retries); + while (!-d $headersdir && $retries < 5) { + $headersdir = chomp_(`mktemp -d /tmp/rpmdrake.XXXXXXXX`); + $retries++; + -d $headersdir or warn qq(Could not create temporary directory "$headersdir"); + } + -d $headersdir or die qq(Could not create temporary directory "$headersdir"); $packer->extract_archive($headersdir, $p->header_filename); $p->update_header("$headersdir/" . $p->header_filename) or do { warn "Warning, could not extract header!"; |