Closed 35C4n0r closed 1 year ago
@pombredanne @JonoYang any suggestions ?
@35C4n0r
version = str(version)
).dsc
files?rt
as the arguments to gzip.open()
@JonoYang Instead of skipping, how about if we don't generate purls for them and just return the uri objects for them without purl.
@JonoYang, the problem is not only with .dsc files but with all the files which are
Collectible: https://github.com/nexB/purldb/blob/main/minecode/visitors/debian.py#L101
But are not recognized by debutils https://github.com/nexB/debian-inspector/blob/main/src/debian_inspector/package.py#L132
also should isCollectible function recognize .xz
files and InRelease
files?
To get the Name, Version & Arch. from a debian file name we use
get_nva
function ( https://github.com/nexB/debian-inspector/blob/main/src/debian_inspector/package.py#L113 ) this leads to two problems:get_nva
is a Version Object and we cannot directly pass it to the PackageURL version, see https://github.com/nexB/purldb/blob/main/minecode/visitors/debian.py#L117get_nva
do not handles .dsc files), generating URI is enough for them.The mode argument can be any of 'r', 'rb', 'a', 'ab', 'w', 'wb', 'x' or 'xb' for binary mode, or 'rt', 'at', 'wt', or 'xt' for text mode. The default is 'rb'
, since we later need do operation on this content ( see https://github.com/nexB/purldb/blob/main/minecode/visitors/debian.py#L89 ) we need to either use'rt'
ordecode("utf-8")
.