diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk index 7802c3a883..2c277f7079 100644 --- a/package/pkg-cargo.mk +++ b/package/pkg-cargo.mk @@ -95,6 +95,15 @@ ifneq ($$($(2)_SUBDIR),) $(2)_DL_ENV += BR_CARGO_MANIFEST_PATH=$$($(2)_SUBDIR)/Cargo.toml endif +# Because we append vendored info, we can't rely on the values being empty +# once we eventually get into the generic-package infra. So, we duplicate +# the heuristics here +ifndef $(2)_LICENSE + ifdef $(3)_LICENSE + $(2)_LICENSE = $$($(3)_LICENSE) + endif +endif + # Due to vendoring, it is pretty likely that not all licenses are # listed in _LICENSE. If the license is unset, it is "unknown" # so adding unknowns to some unknown is still some other unkown,