blueprint: do not append "-" to name-version if version is empty

Previously, bash with empty version was converted to name-version "bash-"
that is obviously ill-formed. This commit fixes it.
This commit is contained in:
Ondřej Budai 2020-06-09 19:08:24 +02:00 committed by Tom Gundersen
parent cd674ea39f
commit 6e6eae24eb

View file

@ -108,7 +108,7 @@ func (b *Blueprint) GetPackages() []string {
func (p Package) ToNameVersion() string {
// Omit version to prevent all packages with prefix of name to be installed
if p.Version == "*" {
if p.Version == "*" || p.Version == "" {
return p.Name
}