about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--config.toml.example11
-rw-r--r--src/tools/collect-license-metadata/src/main.rs2
-rw-r--r--src/tools/collect-license-metadata/src/path_tree.rs4
3 files changed, 11 insertions, 6 deletions
diff --git a/config.toml.example b/config.toml.example
index ffc6a330b9f..ca54cbd2d68 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -255,11 +255,14 @@ changelog-seen = 2
 # Defaults to the Python interpreter used to execute x.py
 #python = "python"
 
-# The path to the REUSE executable to use. REUSE will be used to gather
-# the licensing information of the codebase.
+# The path to the REUSE executable to use. Note that REUSE is not required in
+# most cases, as our tooling relies on a cached (and shrinked) copy of the
+# REUSE output present in the git repository and in our source tarballs.
 #
-# If this is omitted, the cached licensing information present in the source
-# tarball will have to be present.
+# REUSE is only needed if your changes caused the overral licensing of the
+# repository to change, and the cached copy has to be regenerated.
+#
+# Defaults to the "reuse" command in the system path.
 #reuse = "reuse"
 
 # Force Cargo to check that Cargo.lock describes the precise dependency
diff --git a/src/tools/collect-license-metadata/src/main.rs b/src/tools/collect-license-metadata/src/main.rs
index 0864408fd53..ca2a6f4b8c8 100644
--- a/src/tools/collect-license-metadata/src/main.rs
+++ b/src/tools/collect-license-metadata/src/main.rs
@@ -22,7 +22,7 @@ fn main() -> Result<(), Error> {
     std::fs::write(
         &dest,
         &serde_json::to_vec_pretty(&serde_json::json!({
-            "files": crate::path_tree::strip_interning(tree, &interner),
+            "files": crate::path_tree::expand_interned_licenses(tree, &interner),
         }))?,
     )?;
 
diff --git a/src/tools/collect-license-metadata/src/path_tree.rs b/src/tools/collect-license-metadata/src/path_tree.rs
index fa4ae87bdad..133ff683737 100644
--- a/src/tools/collect-license-metadata/src/path_tree.rs
+++ b/src/tools/collect-license-metadata/src/path_tree.rs
@@ -270,7 +270,9 @@ pub(crate) fn build(mut input: Vec<(PathBuf, LicenseId)>) -> Node<LicenseId> {
     Node::Root { childs }
 }
 
-pub(crate) fn strip_interning(
+/// Convert a `Node<LicenseId>` into a `Node<&License>`, expanding all interned license IDs with a
+/// reference to the actual license metadata.
+pub(crate) fn expand_interned_licenses(
     node: Node<LicenseId>,
     interner: &LicensesInterner,
 ) -> Node<&License> {