Skip to content

Resources from system packages are not being associated with that package #407

Description

@JonoYang

I am running the docker pipeline on a docker image that uses Ubuntu 20.04 as the base image. The pipeline is able to report the installed system packages but does not correctly associate the package Resources to the package.

I've done some digging and found that the issue is with how the debian package info files are named.

By default, the files from /var/lib/dpkg/info/ that Debian based distros use to list the install location of package files has the format of
<package name>:<arch>.<ending> e.g. guile-2.0-libs:amd64.md5sums

When we extract the Docker image layer using extractcode, the colon in these filenames turns into an underscore: guile-2.0-libs_amd64.md5sums. This causes DebianPackage.get_list_of_installed_files() (https://github.com/nexB/scancode-toolkit/blob/develop/src/packagedcode/debian.py#L60) to not find the md5sum or list file for the package, and the package resources are not associated with it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions