Bug 11416 - check-uniq-files staging issue
Summary: check-uniq-files staging issue
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2018.02.4
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: Yann E. MORIN
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-22 07:22 UTC by Jean-pierre Cartal
Modified: 2019-11-29 13:08 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-pierre Cartal 2018-10-22 07:22:48 UTC
Lots of false positive are happening for files located in staging directory when building, even when building from scratch e.g. :
Warning: staging file "./usr/lib/libnl-route-3.la" is touched by more than one package: [u'libnl', u'json-c', u'ncurses', u'readline', u'lvm2', u'popt', u'util-linux', u'cryptsetup', u'expat', u'dbus', u'e2fsprogs', u'kmod', u'eudev', u'libpng', u'freetype', u'libopenssl', u'ffmpeg', u'giflib', u'graphite2', u'icu', u'libffi', u'pcre', u'libglib2', u'harfbuzz', u'jpeg-turbo', u'json-glib', u'libcap', u'libcurl', u'libexif', u'libmng', u'libnspr', u'sqlite', u'libnss', u'libogg', u'pciutils', u'tremor', u'webp', u'wpa_supplicant', u'CUnit']
Comment 1 Jean-pierre Cartal 2018-10-22 07:33:41 UTC
The following patch avoids the false positive warnings regarding .la files: 
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index a689dde4d2..110f8ee4a5 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -276,7 +276,8 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
                                $(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\
        fi
        @$(call MESSAGE,"Fixing libtool files")
-       $(Q)find $(STAGING_DIR)/usr/lib* -name "*.la" | xargs --no-run-if-empty \
+       $(Q)for lafile in $$(find $(@D) -name *.la -exec basename {} \; | sort -u); do \
+               ls $(STAGING_DIR)/usr/lib*/$${lafile}; done | xargs --no-run-if-empty \
                $(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \
                        -e "s:$(STAGING_DIR):@STAGING_DIR@:g" \
                        $(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\
Comment 2 Thomas Petazzoni 2019-11-29 13:08:22 UTC
We removed check-uniq-files in commit 2496189a4207173e4cd5bbab90256f911175ee57