From 7a1553dc55db0052cef2799417e6e23c1c8f6939 Mon Sep 17 00:00:00 2001 From: Andrea Bernardo Ciddio Date: Fri, 30 Jan 2015 16:22:27 +0000 Subject: [PATCH] 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. --- deb/import.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deb/import.go b/deb/import.go index 2039288a..971a17e6 100644 --- a/deb/import.go +++ b/deb/import.go @@ -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)