Skip to content

Commit

Permalink
Skip provider searching for already installed pkgs
Browse files Browse the repository at this point in the history
We do not offer a provider menu for already installed packages. For
example if you already have yay installed then yay -S yay will just
reinstall yay. No prompt will be given for yay-git or yay-bin.

Therefore it makes sense to disable provider searching for these
packages. Expecially because it is the slowest part of dependency
resolving and many already installed packages are going to be resolved
when using -u.
  • Loading branch information
Morganamilo committed May 30, 2018
1 parent 7a1e2de commit 5322708
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions depPool.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ func (dp *depPool) findProvides(pkgs stringSet) error {
}

for pkg := range pkgs {
if _, err := dp.LocalDb.PkgByName(pkg); err == nil {
continue
}
wg.Add(1)
go doSearch(pkg)
}
Expand Down

0 comments on commit 5322708

Please sign in to comment.