Skip to content

Commit

Permalink
Update debian.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xonx4l committed Aug 30, 2023
1 parent 5dfcfcb commit 2086bb1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/packagedcode/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,15 +629,22 @@ def build_package_data(debian_data, datasource_id, package_type='deb', distro=No
keywords.append(keyword)

source_packages = []
source = debian_data.get('source')
if source:
source = debian_data.get('source')
if source:
if distro is None:
source_pkg_purl = PackageURL(
type=package_type,
name=source
).to_string()
else:
source_pkg_purl = PackageURL(
type=package_type,
name=source,
namespace=distro
).to_string()

source_packages.append(source_pkg_purl)
source_packages.append(source_pkg_purl)


return models.PackageData(
datasource_id=datasource_id,
Expand Down

0 comments on commit 2086bb1

Please sign in to comment.