Open DennisClark opened 4 years ago
@DennisClark there is no guaranteed relationship between the package data collected from a scan and the actual files beeing scanned... that's not scancode fault but that's driven by the context.
Here we parse the package manifest (a .nuspec for a NuGet) which is here: https://github.com/zeromq/libzmq/blob/v4.3.2/packaging/nuget/package.nuspec
The thing is that https://github.com/zeromq/libzmq is a source repository and it does not contains the actual built NuGet. ScanCode infers that the corresponding standard repository_download_url
is at https://www.nuget.org/api/v2/package/libzmq-vc120/4.2.3.0 from that data. and that seems correct to me. At that URL, the libzmq-vc120.4.2.3.nupkg
is a built binary NuGet package (a zip archive) that was built using the .nuspec
above as an "build script" and it would contain a few files (such as the .nuspec
) that exist also in the source repo... but the key DLLs and executables compiled from the source code would rarely be in the source repo and found only in the nupkg
.
I hope my explanation makes some sense and is not too contrived!
in this nuget case, the download URL is redirected to https://globalcdn.nuget.org/packages/libzmq-vc120.4.2.3.nupkg SCTK may not be able to figure that out unless we add a way where SCTK can make online network calls, but ScanCode.io would likely be OK to do such thing in a pipeline. Alternatively we could always infer a package archive filename and add this as a new attribute for a package?
Here libzmq-vc120.4.2.3.nupkg
could be derived from the details we get in https://www.nuget.org/api/v2/package/libzmq-vc120/4.2.3.0
I scanned libmzq-4.3.2 using scancode-toolkit-develop from 2020-01-16. The scan results include this:
If you use the downoload_url provided in the scan results, you get this file:
libzmq-vc120.4.2.3.nupkg
but that filename value is not to be found in the original scan results.There is no obvious, reliable way to derive that filename from the scan results, which is unfortunate if you are trying to use the consolidated package info from the scan itself. Is there a way that scancode-toolkit can provide the correct package filename? libzmq-4.3.2.tar.gz libzmq-4.3.2.json.zip