projg2/pycargoebuild

Invalid LICENSE values produced because of line wrapping

thesamesam opened this issue · 0 comments

Using pycargoebuild on dev-python/qiskit-terra (0.22.2 -> 0.22.3) results in LICENSE being given invalid values:

$ git checkout 19f0fba10dd4441c4d2ad6819e8983989442e6c8~1
$ cd dev-python/qiskit-terra
$ cp qiskit-terra-0.22.2.ebuild qiskit-terra-0.22.3.ebuild
# Add '# Dependent crate licenses' above LICENSES+= line
$ pkgdev manifest
$ ebuild qiskit-terra-0.22.3.ebuild clean unpack

$ pycargoebuild /var/tmp/portage/dev-python/qiskit-terra-0.22.3/work/qiskit-terra-0.22.3/ -i qiskit-terra-0.22.3.ebuild
[WARNING] The in-place mode updates CRATES and crate LICENSE+= variables only, other metadata is left unchanged
qiskit-terra-0.22.3.ebuild

$ pkgdev manifest

$ pkgcheck scan
dev-python/qiskit-terra
  RedundantVersion: version 0.22.2: slot(0) keywords are overshadowed by version: 0.22.3
  MissingManifest: version 0.22.3: distfiles missing from Manifest: [ crossbeam-epoch-0.9.13.crate, crossbeam-utils-0.8.14.crate, indexmap-1.9.2.crate, libm-0.2.6.crate, memoffset-0.7.1.crate, num_cpus-1.14.0.crate, ppv-lite86-0.2.17.crate, pyo3-0.17.3.crate, pyo3-build-config-0.17.3.crate, pyo3-ffi-0.17.3.crate, pyo3-macros-0.17.3.crate, pyo3-macros-backend-0.17.3.crate, rayon-1.6.0.crate, rayon-core-1.10.1.crate, target-lexicon-0.12.5.crate ]
  UnknownLicense: version 0.22.3: unknown licenses: DFS-2016, Unicode-

In the ebuild, we have post-pycargoebuild mangling:

LICENSE="Apache-2.0"
# Dependent crate licenses
LICENSE+="
        Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 MIT Unicode-
        DFS-2016
"

It has split Unicode-UFS-2016 into two "licenses".