Преглед на файлове

pkg-utils.mk: legal-license-file: handle multiple license files with same name

Some packages (kmod, e2fsprogs, ..) contain multiple (different) license
files with the same file name, but in different directories.

These are currently all copied to the same filename in
output/legal-info/licenses/<pkg>, overwriting everything but the last file.

Fix it by recreating the same directory structure under legal-info.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Peter Korsgaard преди 12 години
родител
ревизия
31aa4264d8
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      package/pkg-utils.mk

+ 2 - 2
package/pkg-utils.mk

@@ -106,6 +106,6 @@ define legal-license-file # pkg, filename, file-fullpath
 	$(call legal-license-header,$(1),$(2) file) && \
 	cat $(3) >>$(LEGAL_LICENSES_TXT) && \
 	echo >>$(LEGAL_LICENSES_TXT) && \
-	mkdir -p $(LICENSE_FILES_DIR)/$(1)/ && \
-	cp $(3) $(LICENSE_FILES_DIR)/$(1)/
+	mkdir -p $(LICENSE_FILES_DIR)/$(1)/$(dir $(2)) && \
+	cp $(3) $(LICENSE_FILES_DIR)/$(1)/$(2)
 endef