Skip to content

Commit

Permalink
fix(deps): fix wrong method implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jguer committed Aug 18, 2020
1 parent 7b70462 commit ce79d53
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion download.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func getPkgbuildsfromABS(pkgs []string, path string, dbExecutor db.Executor, for
pkgDB, name := text.SplitDBFromName(pkgN)

if pkgDB != "" {
pkg = dbExecutor.PackageFromDB(name, pkgDB)
pkg = dbExecutor.SatisfierFromDB(name, pkgDB)
} else {
pkg = dbExecutor.SyncSatisfier(name)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/db/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type Executor interface {
LocalSatisfierExists(string) bool
PackageConflicts(RepoPackage) []alpm.Depend
PackageDepends(RepoPackage) []alpm.Depend
PackageFromDB(string, string) RepoPackage
SatisfierFromDB(string, string) RepoPackage
PackageGroups(RepoPackage) []string
PackageOptionalDepends(RepoPackage) []alpm.Depend
PackageProvides(RepoPackage) []alpm.Depend
Expand Down
2 changes: 1 addition & 1 deletion pkg/db/ialpm/alpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func (ae *AlpmExecutor) LocalPackage(pkgName string) db.RepoPackage {
return pkg
}

func (ae *AlpmExecutor) PackageFromDB(pkgName, dbName string) db.RepoPackage {
func (ae *AlpmExecutor) SatisfierFromDB(pkgName, dbName string) db.RepoPackage {
singleDB, err := ae.handle.SyncDBByName(dbName)
if err != nil {
return nil
Expand Down
6 changes: 3 additions & 3 deletions pkg/dep/depPool.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (dp *Pool) ResolveTargets(pkgs []string,

// If there'ss a different prefix only look in that repo
if target.DB != "" {
foundPkg = dp.AlpmExecutor.PackageFromDB(target.DepString(), target.DB)
foundPkg = dp.AlpmExecutor.SatisfierFromDB(target.DepString(), target.DB)
} else {
// otherwise find it in any repo
foundPkg = dp.AlpmExecutor.SyncSatisfier(target.DepString())
Expand Down Expand Up @@ -201,7 +201,7 @@ func (dp *Pool) findProvides(pkgs stringset.StringSet) error {
}

for pkg := range pkgs {
if dp.AlpmExecutor.LocalSatisfierExists(pkg) {
if dp.AlpmExecutor.LocalPackage(pkg) != nil {
continue
}
wg.Add(1)
Expand Down Expand Up @@ -384,7 +384,7 @@ func (dp *Pool) findSatisfierAurCache(dep string, ignoreProviders, noConfirm, pr
seen := make(stringset.StringSet)
providerSlice := makeProviders(depName)

if dp.AlpmExecutor.LocalSatisfierExists(depName) {
if dp.AlpmExecutor.LocalPackage(depName) != nil {
if pkg, ok := dp.AurCache[dep]; ok && pkgSatisfies(pkg.Name, pkg.Version, dep) {
return pkg
}
Expand Down

0 comments on commit ce79d53

Please sign in to comment.