mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
Use redhat as namespace for redhat rpms (#2914)
The namespace value of `redhat` signifies this as an RPM package produced and distributed by Red Hat. Using "rhel" in the namespace is not correct. Signed-off-by: Ralph Bean <rbean@redhat.com>
This commit is contained in:
parent
29d601d1f1
commit
8a7f08e2c8
2 changed files with 5 additions and 2 deletions
|
@ -89,6 +89,9 @@ func packageURL(name, arch string, epoch *int, srpm string, version, release str
|
|||
if distro != nil {
|
||||
namespace = distro.ID
|
||||
}
|
||||
if namespace == "rhel" {
|
||||
namespace = "redhat"
|
||||
}
|
||||
|
||||
qualifiers := map[string]string{}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ func Test_packageURL(t *testing.T) {
|
|||
Release: "r",
|
||||
Epoch: nil,
|
||||
},
|
||||
expected: "pkg:rpm/rhel/p@v-r?distro=rhel-8.4",
|
||||
expected: "pkg:rpm/redhat/p@v-r?distro=rhel-8.4",
|
||||
},
|
||||
{
|
||||
name: "with arch and epoch",
|
||||
|
@ -67,7 +67,7 @@ func Test_packageURL(t *testing.T) {
|
|||
Release: "r",
|
||||
SourceRpm: "sourcerpm",
|
||||
},
|
||||
expected: "pkg:rpm/rhel/p@v-r?upstream=sourcerpm&distro=rhel-8.4",
|
||||
expected: "pkg:rpm/redhat/p@v-r?upstream=sourcerpm&distro=rhel-8.4",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue