aboutcode-org / aboutcode-org/scancode-toolkit

Improve package url derived from ABOUT files

Aberta
#1,879 1 comentário 1 reação 0 responsáveis Ver no GitHub
bug package scan package-formats
Linguagem predominante
Python
Estrelas
2.6k
Forks
791
Merge médio
1d 12h
PRs com merge (30d)
5

Descrição

### Description

> Please leave a brief description of the bug or feature request:

The output of a `scancode --package` scan on `ABOUT` files could be improved by using additional metadata the `ABOUT` file provides.

Scanning https://github.com/nexB/scancode-toolkit/blob/develop/src/scancode/interrupt-robotframework.ABOUT returns a generic `pkg:about/robotframework@3.0.2` instead of the fully qualified `pkg:pypi/robotframework@3.0.2`. The `download_url` could be used to detect that this is a package from PyPi.

Looking at https://github.com/nexB/scancode-toolkit/blob/e3ab9d730e9c0daba2a81a35db3d8f84582b7ca2/src/typecode/magic2.py.ABOUT produces `pkg:about/python-magic`, the `download_url` gives us all the information we need to fully qualify it as `pkg:pypi/python-magic@0.4.6`.

### How To Reproduce

> Tell us how to reproduce the issue.

```
mkdir test
curl https://raw.githubusercontent.com/nexB/scancode-toolkit/e3ab9d730e9c0daba2a81a35db3d8f84582b7ca2/src/typecode/magic2.py.ABOUT >> test/magic2.py.ABOUT
curl https://raw.githubusercontent.com/nexB/scancode-toolkit/develop/src/scancode/interrupt-robotframework.ABOUT >> test/interrupt-robotframework.ABOUT
scancode --json-pp - --package test/ | grep purl
```

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.