Fix incomplete dependencies with follow-all-variants

When `-dep-follow-all-variants` option is enabled, dependency resolving
process shouldn't stop even if dependency is already satisfied - there
mgiht be other ways to satisfy dependency.

Also fix issue with parsing multiarch specs like
`python:any`.
This commit is contained in:
Andrey Smirnov
2017-09-26 00:09:15 +03:00
parent 1c44b4f787
commit e5198178a5
4 changed files with 46 additions and 4 deletions
+7
View File
@@ -262,6 +262,13 @@ func ParseDependency(dep string) (d Dependency, err error) {
}
d.Pkg = strings.TrimSpace(dep[0:i])
if strings.ContainsRune(d.Pkg, ':') {
parts := strings.SplitN(d.Pkg, ":", 2)
d.Pkg, d.Architecture = parts[0], parts[1]
if d.Architecture == "any" {
d.Architecture = ""
}
}
rel := ""
if dep[i+1] == '>' || dep[i+1] == '<' || dep[i+1] == '=' {