mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-21 10:58:23 +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 parent
8375a2c30f
commit
7a1553dc55
1 file changed
+1
-1
+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