You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In updating the application Packages scanning step in the scan_codebase pipeline for #447, I noticed that the CodebaseResources of a Package are not associated with the Packages that was scanned. Looking a little deeper, I see that the PackageResources in scancode.io cannot be properly associated to the Package they are from by using the .assemble() methods from packagedcode's Package handlers. This is because of how for_packages is implemented on the CodebaseResource model in scancode.io and the Resource model in commoncode. In scancode.io, for_packages on the CodebaseResource model is a property that collects the purls for Packages that have been related to that CodebaseResource. In scancode-toolkit/commoncode, for_packages on the Resource model is a list that contains package_uid strings for the Package the Resource is from.
When you run the .assemble() methods from packagedcode Package handlers on a CodebaseResource object, it attempts to append package_uid strings to the for_packages field. This does not properly work since CodebaseResource.for_packages is a property, not an attribute that can be used the same way.
The text was updated successfully, but these errors were encountered:
This issue has been fixed, following an update to scancode-toolkit where the code has been modified to be able to accept different functions that adds a package to a resource. aboutcode-org/scancode-toolkit#3035
In updating the application Packages scanning step in the scan_codebase pipeline for #447, I noticed that the
CodebaseResource
s of aPackage
are not associated with thePackage
s that was scanned. Looking a little deeper, I see that thePackage
Resource
s in scancode.io cannot be properly associated to thePackage
they are from by using the.assemble()
methods frompackagedcode
'sPackage
handlers. This is because of howfor_packages
is implemented on theCodebaseResource
model in scancode.io and theResource
model incommoncode
. In scancode.io,for_packages
on theCodebaseResource
model is a property that collects the purls forPackage
s that have been related to thatCodebaseResource
. In scancode-toolkit/commoncode,for_packages
on theResource
model is a list that containspackage_uid
strings for thePackage
theResource
is from.When you run the
.assemble()
methods frompackagedcode
Package handlers on aCodebaseResource
object, it attempts to appendpackage_uid
strings to thefor_packages
field. This does not properly work sinceCodebaseResource.for_packages
is a property, not an attribute that can be used the same way.The text was updated successfully, but these errors were encountered: