Bug 6344 - Wrong handling of license text files with same name and different directory
Summary: Wrong handling of license text files with same name and different directory
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2013.02
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-26 09:47 UTC by Aleksandar
Modified: 2013-06-26 11:48 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 Aleksandar 2013-06-26 09:47:37 UTC
Use e2fsprogs as example

License files given there are:
COPYING lib/uuid/COPYING lib/ss/mit-sipb-copyright.h lib/et/internal.h

Not both files (COPYING and lib/uuid/COPYING) are copied in output/legal-info/licenses/e2fsprogs because with the same name.
Comment 1 Aleksandar 2013-06-26 09:52:21 UTC
Quick/dirty solution that works for me: take all files stated in *.mk and merge them in single file called license.txt

Index: pkg-utils.mk
===================================================================
--- pkg-utils.mk	(revision 12362)
+++ pkg-utils.mk	(revision 12874)
@@ -95,7 +95,7 @@
 define legal-warning-pkg-savednothing # pkg, {local|override}
 	$(call legal-warning-pkg,$(1),sources and license files not saved ($(2) packages not handled))
 endef
-legal-manifest=echo '"$(1)","$(2)","$(3)","$(4)","$(5)"' >>$(LEGAL_MANIFEST_CSV)
+legal-manifest=echo '"$(1)","$(2)","$(3)","license.txt","$(5)"' >>$(LEGAL_MANIFEST_CSV)
 define legal-license-header
 	echo -e "$(LEGAL_INFO_SEPARATOR)\n\t$(1):" \
 		"$(2)\n$(LEGAL_INFO_SEPARATOR)\n\n" >>$(LEGAL_LICENSES_TXT)
@@ -108,5 +108,6 @@
 	cat $(3) >>$(LEGAL_LICENSES_TXT) && \
 	echo >>$(LEGAL_LICENSES_TXT) && \
 	mkdir -p $(LICENSE_FILES_DIR)/$(1)/ && \
-	cp $(3) $(LICENSE_FILES_DIR)/$(1)/
+	echo -e "$(LEGAL_INFO_SEPARATOR)\n$(2):" >> $(LICENSE_FILES_DIR)/$(1)/license.txt && \
+	cat $(3) >> $(LICENSE_FILES_DIR)/$(1)/license.txt
 endef
Comment 2 Thomas Petazzoni 2013-06-26 11:48:50 UTC
This has already been fixed in Git by commit 31aa4264d8839d05684e67a238837e8633d1e1bc. See http://git.buildroot.net/buildroot/commit/?id=31aa4264d8839d05684e67a238837e8633d1e1bc.

Thanks for the report!