Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian package is not extracted recursively #1081

Closed
pombredanne opened this issue Feb 19, 2024 · 6 comments
Closed

Debian package is not extracted recursively #1081

pombredanne opened this issue Feb 19, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@pombredanne
Copy link
Member

I create a "scan_single_package" project using http://ftp.us.debian.org/debian/pool/main/e/elfutils/elfutils_0.188-2.1_amd64.deb as an input.
The package is not fully extracted recursively, even though the settings are to extract recursively

@pombredanne pombredanne added the bug Something isn't working label Feb 19, 2024
@tdruez
Copy link
Member

tdruez commented Feb 19, 2024

@pombredanne Could you add the recurse option to the extractcode.api.extract_archive function?

@pombredanne
Copy link
Member Author

pombredanne commented Feb 19, 2024

extractcode.api.extract_archive cannot recurse
For this you need to use: extractcode.api.extract_archives instead and extract in-place

@tdruez
Copy link
Member

tdruez commented Feb 19, 2024

@pombredanne The current implementation of extraction for the single package scan is to extract directly the single archive to the codebase work directory.
The extractcode.api.extract_archives extracts in place, so we need to copy the input archive first. This would change the scan root directory of 1 level.
Are you sure you want to apply this change?

Current:
Screenshot 2024-02-19 at 22 05 38

Using extracts:
Screenshot 2024-02-19 at 22 05 42

@tdruez
Copy link
Member

tdruez commented Feb 19, 2024

We could add a new step to run the extract_archives after extracting the single archive to the codebase dir.

@pombredanne
Copy link
Member Author

Ok, then may be you could keep the extraction the way it is today and add a call to extractcode.api.extract_archives() afterwards to force recursion?

tdruez added a commit that referenced this issue Feb 19, 2024
Signed-off-by: tdruez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Feb 20, 2024
Signed-off-by: tdruez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Feb 20, 2024
Signed-off-by: tdruez <tdruez@nexb.com>
@tdruez
Copy link
Member

tdruez commented Feb 20, 2024

Fixed in #1083

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants