From 619d44b23ab3f1999539091e4f521ed333115945 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Thu, 9 Apr 2026 10:13:59 +0200 Subject: [PATCH] package/pkg-utils: add 'hashes' to show-info Finding the hash file for a package is non-trivial, as they can be in a sub-directory or under GLOBAL_PATCH_DIR. To allow other tools such as utils/generate-cyclonedx to find hash files, expose this information from show-info. If a package does not provide a hash file, create an empty hashes array. Suggested-by: Thomas Perale Signed-off-by: Martin Willi Signed-off-by: Arnout Vandecappelle --- package/pkg-utils.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index 211e681e8f..17b0aa1760 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -197,6 +197,13 @@ define _json-info-pkg-details }, ) ], + "hashes": [ + $(call make-comma-list, \ + $(foreach hash,$(wildcard $($(1)_HASH_FILES)), + $(call mk-json-str,$(hash)) \ + ) \ + ) + ], "patches": [ $(foreach patch, \ $(call pkg-patches-list,$(1)), \