id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4070	'make install' occasionally fails as: /usr/bin/install: cannot create regular file '.../mc-4.8.24/image/usr/share/mc/mc.lib': File exists	slyfox	andrew_b	"The install failure originally reported by Rolf Eike Beer who encountered the failure on '''sparc''' machine (very high parallelism and relatively slow individual cores).

The relevant build log snippet:
{{{
$ make -j20 DESTDIR=/var/tmp/portage/app-misc/mc-4.8.24/image install
...
 /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c -m 644 mc.lib '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc'
 /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c -m 644 mc.lib mc.charsets '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc'
...
/usr/bin/install: cannot create regular file '/var/tmp/portage/app-misc/mc-4.8.24/image/usr/share/mc/mc.lib': File exists
}}}

Here '''.../xattr/install''' is a tiny wrapper around '''/usr/bin/install'''.

The race condition is in '''/usr/bin/install''' itself:

{{{
# sequential works:
$ ( install -c -m 644 /bin/bash . ; install -c -m 644 /bin/bash .; wait )
# parallel fails:
$ ( install -c -m 644 /bin/bash . & install -c -m 644 /bin/bash .; wait )
install: cannot create regular file './bash': File exists
}}}

I think '''mc.lib''' gets installed twice because it's lished in in two '''_DATA''' variables in '''misc/Makefile.am''':

{{{
dist_pkgdata_DATA = \
        mc.lib

pkgdata_DATA = \
        $(dist_pkgdata_DATA) \
        $(PKGDATA_OUT)
}}}
"	defect	closed	major	4.8.25	mc-core	4.8.24	fixed					merged	committed-master
