aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-10-24 21:58:13 +0000
committerThierry Vignaud <tv@mandriva.org>2006-10-24 21:58:13 +0000
commitd5def04a105732549b5041df2f6814db76560c66 (patch)
tree39d42bceb567a5c71a34e0657789c60cab4215b5
parenta8508f7db09985074f7990725996cb5a0b6e48f3 (diff)
downloadrpmdrake-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-xrpmdrake9
1 files changed, 7 insertions, 2 deletions
diff --git a/rpmdrake b/rpmdrake
index a867eaba..33bed85f 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -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!";