Skip to content

InstalledWindowsProgram.populate_installed_files() does not return the right relative paths for installed files #2614

Description

@JonoYang

I am running a few Windows Docker images through a scancode.io pipeline. I noticed that I was getting an error that scancode.io cannot find the installed files of a package from a particular Docker layer.

   installed file rootfs_path: /Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll
   layer rootfs_path: f358be10862ccbc329638b9e10b3d497dd7cd28b0e8c7931b4a545c88d7f7cd6/Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll
      installed file is missing: /Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll
...

In the above example, the proper layer rootfs_path for CvtResUI.dll should be f358be10862ccbc329638b9e10b3d497dd7cd28b0e8c7931b4a545c88d7f7cd6/Files/Windows/Microsoft.NET/Framework64/v4.0.30319/1033/CvtResUI.dll. In Docker Windows layers, the rootfs starts in the Files directory rather than the layer directory itself. InstalledWindowsProgram.populate_installed_files() should be modified to assume that the root_dir passed in is equivalent to the Docker layer directory itself.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions