mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Update dependency definition in conflicts (fixes #185)
The dependency specified when looking for conflicting packages does not take into account the package version, as by default the Relation field in the Dependency structure is set to VersionDontCare. This should fix #185.
This commit is contained in:
+1
-1
@@ -140,7 +140,7 @@ func ImportPackageFiles(list *PackageList, packageFiles []string, forceReplace b
|
||||
}
|
||||
|
||||
if forceReplace {
|
||||
conflictingPackages := list.Search(Dependency{Pkg: p.Name, Version: p.Version, Architecture: p.Architecture}, true)
|
||||
conflictingPackages := list.Search(Dependency{Pkg: p.Name, Version: p.Version, Relation: VersionEqual, Architecture: p.Architecture}, true)
|
||||
for _, cp := range conflictingPackages {
|
||||
reporter.Removed("%s removed due to conflict with package being added", cp)
|
||||
list.Remove(cp)
|
||||
|
||||
Reference in New Issue
Block a user