Message ID | 8647e9778bb35b421a4a989e0b69b6a4d18968cd.1698941362.git.yann.morin@orange.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/8] package/pkg-cargo: don't expand license info when empty | expand |
>>>>> <yann.morin@orange.com> writes: > From: "Yann E. MORIN" <yann.morin@orange.com> > The cargo infrastructure automatically expands the list of licenses with > a little blurb that the licenses for vendored dependencies might be > missing in the list. > However, when a package does not define a license, the resulting text is > sub-optimal, resulting in a manifest that contains (with a leading > comma, yes): > , vendored dependencies licenses probably not listed > In that case, pointing out some unkown licensing terms may be part of > unkonwn licensing terms is superfluous. > Instead, just let the legal infra do its job, and report an "unkown" > license altogether. > Signed-off-by: Yann E. MORIN <yann.morin@orange.com> Committed to 2023.02.x and 2023.08.x, thanks.
diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk index 264bf5a1ae..7802c3a883 100644 --- a/package/pkg-cargo.mk +++ b/package/pkg-cargo.mk @@ -96,8 +96,12 @@ $(2)_DL_ENV += BR_CARGO_MANIFEST_PATH=$$($(2)_SUBDIR)/Cargo.toml endif # Due to vendoring, it is pretty likely that not all licenses are -# listed in <pkg>_LICENSE. +# listed in <pkg>_LICENSE. If the license is unset, it is "unknown" +# so adding unknowns to some unknown is still some other unkown, +# so don't append the blurb in that case. +ifneq ($$($(2)_LICENSE),) $(2)_LICENSE += , vendored dependencies licenses probably not listed +endif # Note: in all the steps below, we "cd" into the build directory to # execute the "cargo" tool instead of passing $(@D)/Cargo.toml as the