Skip to content

Codebase resource "Name" is not the filename #467

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

Closed
pombredanne opened this issue Jul 21, 2022 · 2 comments
Closed

Codebase resource "Name" is not the filename #467

pombredanne opened this issue Jul 21, 2022 · 2 comments
Labels
question Further information is requested

Comments

@pombredanne
Copy link
Member

pombredanne commented Jul 21, 2022

I found highly surprising that the name field of the CodebaseResource model (and therefore also in the UI) is NOT the actual file name or directory name, but rather has been stripped from it's extension, which is stored in a separate field. What's the rationale for this?

@pombredanne pombredanne added the question Further information is requested label Jul 21, 2022
@JonoYang
Copy link
Member

This inconsistency is causing problems when updating the application package scanning step with the new Package assembly methods from packagedcode. The assembly methods on different Package handlers look for particular Package manifest files by their filename with extension (e.g. https://github.com/nexB/scancode-toolkit/blob/develop/src/packagedcode/npm.py#L72). Because scancode.io stores the filename without the extension in the name field of CodebaseResource, these manifest files are never found and the detected Package data cannot be processed properly.

JonoYang added a commit that referenced this issue Jul 28, 2022
    * Update scancode-toolkit to 31.0.0rc3 #447
    * Update expected test results

Signed-off-by: Jono Yang <[email protected]>
JonoYang added a commit that referenced this issue Jul 28, 2022
    * Update scancode-toolkit to 31.0.0rc3 #447
    * Update expected test results
    * Update code formatting

Signed-off-by: Jono Yang <[email protected]>
JonoYang added a commit that referenced this issue Jul 28, 2022
    * Update scancode-toolkit to 31.0.0rc3 #447
    * Update expected test results
    * Update code formatting

Signed-off-by: Jono Yang <[email protected]>
@tdruez
Copy link
Contributor

tdruez commented Aug 1, 2022

@JonoYang is https://github.com/nexB/scancode.io/compare/package-scanning-update ready for review?
I don't see any PR yet ;)

JonoYang added a commit that referenced this issue Aug 9, 2022
    * Create migration on CodebaseResource to append extension to name, if name does not end with extension
    * Update exptected test results

Signed-off-by: Jono Yang <[email protected]>
JonoYang added a commit that referenced this issue Aug 9, 2022
    * Create migration on CodebaseResource to append extension to name, if name does not end with extension
    * Update exptected test results

Signed-off-by: Jono Yang <[email protected]>
tdruez pushed a commit that referenced this issue Aug 10, 2022
* Create migration on CodebaseResource to append extension to name, if name does not end with extension
    * Update exptected test results

Signed-off-by: Jono Yang <[email protected]>
@tdruez tdruez closed this as completed Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants