[Pkg-openssl-changes] r803 - openssl/branches/1.1.0/debian/patches
Sebastian Andrzej Siewior
bigeasy at moszumanska.debian.org
Fri Jun 10 18:42:27 UTC 2016
Author: bigeasy
Date: 2016-06-10 18:42:26 +0000 (Fri, 10 Jun 2016)
New Revision: 803
Added:
openssl/branches/1.1.0/debian/patches/utils-mkdir-p-check-if-dir-exists-also-after-mkdir-f.patch
Modified:
openssl/branches/1.1.0/debian/patches/series
Log:
utils: check if mkdir failed because the directory exists
Modified: openssl/branches/1.1.0/debian/patches/series
===================================================================
--- openssl/branches/1.1.0/debian/patches/series 2016-06-05 20:57:13 UTC (rev 802)
+++ openssl/branches/1.1.0/debian/patches/series 2016-06-10 18:42:26 UTC (rev 803)
@@ -8,3 +8,4 @@
pic.patch
c_rehash-compat.patch
#padlock_conf.patch
+utils-mkdir-p-check-if-dir-exists-also-after-mkdir-f.patch
Added: openssl/branches/1.1.0/debian/patches/utils-mkdir-p-check-if-dir-exists-also-after-mkdir-f.patch
===================================================================
--- openssl/branches/1.1.0/debian/patches/utils-mkdir-p-check-if-dir-exists-also-after-mkdir-f.patch (rev 0)
+++ openssl/branches/1.1.0/debian/patches/utils-mkdir-p-check-if-dir-exists-also-after-mkdir-f.patch 2016-06-10 18:42:26 UTC (rev 803)
@@ -0,0 +1,36 @@
+From 1ea06506b33d665a6954c005356f76f5366276d2 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
+Date: Fri, 10 Jun 2016 20:04:51 +0200
+Subject: [PATCH] utils/mkdir-p: check if dir exists also after mkdir failed
+
+with "make install -j8" it happens very often that two or more make
+instances are creating the same directory in parallel. As a result one
+instace creates the directory and second mkdir fails because the
+directory exists already (but it did not while testing for it earlier).
+
+Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
+---
+ util/mkdir-p.pl | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/util/mkdir-p.pl b/util/mkdir-p.pl
+index 4f44266802c0..793448da1b97 100755
+--- a/util/mkdir-p.pl
++++ b/util/mkdir-p.pl
+@@ -33,6 +33,12 @@ sub do_mkdir_p {
+ do_mkdir_p($parent);
+ }
+
+- mkdir($dir, 0777) || die "Cannot create directory $dir: $!\n";
++ unless (mkdir($dir, 0777)) {
++ if (-d $dir) {
++ # We raced against another instance doing the same thing.
++ return;
++ }
++ die "Cannot create directory $dir: $!\n";
++ }
+ print "created directory `$dir'\n";
+ }
+--
+2.8.1
+
More information about the Pkg-openssl-changes
mailing list