summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-freebsd/freebsd-ubin/files/freebsd-ubin-8.0-xinstall.patch')
-rw-r--r--sys-freebsd/freebsd-ubin/files/freebsd-ubin-8.0-xinstall.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-8.0-xinstall.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-8.0-xinstall.patch
new file mode 100644
index 000000000000..e8f978aabc9e
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-8.0-xinstall.patch
@@ -0,0 +1,26 @@
+Parallel make installs often cause 2 concurrent install -d to fail
+while they are creating the path to the target dirs.
+This patch changes the failure to a warning so that a make -j6 install doesn't
+fails as often as it does on Gentoo/FreeBSD, if it uses /usr/bin/install.
+
+--- usr.bin/xinstall/xinstall.c.orig
++++ usr.bin/xinstall/xinstall.c
+@@ -748,9 +748,17 @@
+ ch = *p;
+ *p = '\0';
+ if (stat(path, &sb)) {
+- if (errno != ENOENT || mkdir(path, 0755) < 0) {
++ if (errno != ENOENT) {
+ err(EX_OSERR, "mkdir %s", path);
+ /* NOTREACHED */
++ } else if (mkdir(path, 0755) < 0) {
++ /* Previous errno from stat() says that the directory didn't exist (ENOENT)
++ * But if errno is now EEXIST, then we just hit a parallel make bug.
++ */
++ if (errno == EEXIST)
++ warn("mkdir: %s now exists!", path); /* let me know when this happens */
++ else
++ err(EX_OSERR, "mkdir %s", path);
+ } else if (verbose)
+ (void)printf("install: mkdir %s\n",
+ path);