Ticket #4070: 0001-misc-Makefile.am-install-mc.lib-only-once-4070.patch

File 0001-misc-Makefile.am-install-mc.lib-only-once-4070.patch, 1.6 KB (added by slyfox, 5 years ago)

0001-misc-Makefile.am-install-mc.lib-only-once-4070.patch

  • misc/Makefile.am

    From 30fd157a73f148dbc150c18b206b85e1a4a93e9c Mon Sep 17 00:00:00 2001
    From: Sergei Trofimovich <slyfox@gentoo.org>
    Date: Tue, 3 Mar 2020 09:26:12 +0000
    Subject: [PATCH] misc/Makefile.am: install 'mc.lib' only once (#4070)
    
    Before the change `mc.lib` was installed twice due to being
    in two `_DATA` variables:
    
    ```
    dist_pkgdata_DATA = \
            mc.lib
    
    pkgdata_DATA = \
            $(dist_pkgdata_DATA) \
            $(PKGDATA_OUT)
    ```
    
    This causes occasional install failures when two parallel
    `/usr/bin/install` calls race in installing the file:
    
    ```
    $ 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
    ```
    
    After the change `mc.lib` is present only in `dist_pkgdata_DATA`.
    
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    ---
     misc/Makefile.am | 2 --
     1 file changed, 2 deletions(-)
    
    diff --git a/misc/Makefile.am b/misc/Makefile.am
    index 8ed182613..24f4a0e1a 100644
    a b dist_pkgdata_DATA = \ 
    1717        mc.lib 
    1818 
    1919pkgdata_DATA = \ 
    20         $(dist_pkgdata_DATA) \ 
    2120        $(PKGDATA_OUT) 
    2221 
    2322SCRIPTS_IN = \ 
    EXTRA_DIST = \ 
    5453        $(LIBFILES_SCRIPT) \ 
    5554        $(SCRIPTS_IN) \ 
    5655        $(noinst_DATA) \ 
    57         $(dist_pkgdata_DATA) \ 
    5856        $(PKGDATA_IN) 
    5957 
    6058install-data-hook: