blob: 824c12f8d281d953384230c1b88ae19e0eafabb6 [file] [log] [blame]
Andrew Geissler4b740dc2020-05-05 08:54:39 -05001From 58dd59637ac5c6340ddfe96ad8b76883e4da20ef Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyfox@gentoo.org>
3Date: Tue, 3 Mar 2020 09:26:12 +0000
4Subject: [PATCH] Ticket #4070: misc/Makefile.am: install mc.lib only once.
5
6Before the change mc.lib was installed twice due to being
7in two _DATA variables:
8
9dist_pkgdata_DATA = \
10 mc.lib
11
12pkgdata_DATA = \
13 $(dist_pkgdata_DATA) \
14 $(PKGDATA_OUT)
15
16This causes occasional install failures when two parallel
17`/usr/bin/install` calls race in installing the file:
18
19$ make -j20 DESTDIR=/var/tmp/portage/app-misc/mc-4.8.24/image install
20...
21 /usr/lib/portage/python3.6/ebuild-helpers/xattr/install \
22 -c -m 644 mc.lib '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc'
23 /usr/lib/portage/python3.6/ebuild-helpers/xattr/install \
24 -c -m 644 mc.lib mc.charsets '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc'
25...
26 /usr/bin/install: cannot create regular file
27 '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc/mc.lib': File exists
28
29After the change mc.lib is present only in dist_pkgdata_DATA.
30
31Upstream-Status: Backport [https://github.com/MidnightCommander/mc/commit/afb09f7cd7024484845ade25e15b8b93d6cf2d2c]
32
33Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
34Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
35Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
36---
37 misc/Makefile.am | 2 --
38 1 file changed, 2 deletions(-)
39
40diff --git a/misc/Makefile.am b/misc/Makefile.am
41index 8ed1826..24f4a0e 100644
42--- a/misc/Makefile.am
43+++ b/misc/Makefile.am
44@@ -17,7 +17,6 @@ dist_pkgdata_DATA = \
45 mc.lib
46
47 pkgdata_DATA = \
48- $(dist_pkgdata_DATA) \
49 $(PKGDATA_OUT)
50
51 SCRIPTS_IN = \
52@@ -54,7 +53,6 @@ EXTRA_DIST = \
53 $(LIBFILES_SCRIPT) \
54 $(SCRIPTS_IN) \
55 $(noinst_DATA) \
56- $(dist_pkgdata_DATA) \
57 $(PKGDATA_IN)
58
59 install-data-hook: