Remove epoch from reported version if it is zero

This commit is contained in:
Elara 2022-11-14 14:59:16 -08:00
parent 2c2a27c9f7
commit 3f2ec8ebd3
3 changed files with 3 additions and 0 deletions

View File

@ -137,6 +137,7 @@ func (d *DNF) ListInstalled(opts *Opts) (map[string]string, error) {
if !ok {
continue
}
version = strings.TrimPrefix(version, "0:")
out[name] = version
}

View File

@ -137,6 +137,7 @@ func (y *YUM) ListInstalled(opts *Opts) (map[string]string, error) {
if !ok {
continue
}
version = strings.TrimPrefix(version, "0:")
out[name] = version
}

View File

@ -137,6 +137,7 @@ func (z *Zypper) ListInstalled(opts *Opts) (map[string]string, error) {
if !ok {
continue
}
version = strings.TrimPrefix(version, "0:")
out[name] = version
}