mirror of
https://github.com/Jguer/yay
synced 2024-10-02 22:33:47 +00:00
Dont use FindSatisfier() in packageSlices()
Now that install() no longer relies on packageSlices() we can drop the use of FindSatisfier() so that only direct package names are understood, this is how pacman -Si works. This also fixes a small issue where `yay -Si mysql` would fail. This is because two repo packages provide `mysql`. This causes Yay to not bother checking the AUR even though there is a package in the AUR called `mysql`
This commit is contained in:
parent
df11b85e54
commit
3ceda128fc
15
query.go
15
query.go
|
@ -236,6 +236,7 @@ func packageSlices(toCheck []string) (aur []string, repo []string, err error) {
|
|||
|
||||
for _, _pkg := range toCheck {
|
||||
db, name := splitDbFromName(_pkg)
|
||||
found := false
|
||||
|
||||
if db == "aur" {
|
||||
aur = append(aur, _pkg)
|
||||
|
@ -245,11 +246,19 @@ func packageSlices(toCheck []string) (aur []string, repo []string, err error) {
|
|||
continue
|
||||
}
|
||||
|
||||
_, errdb := dbList.FindSatisfier(name)
|
||||
found := errdb == nil
|
||||
_ = dbList.ForEach(func(db alpm.Db) error {
|
||||
_, err := db.PkgByName(name)
|
||||
|
||||
if err == nil {
|
||||
found = true
|
||||
return fmt.Errorf("")
|
||||
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
if !found {
|
||||
_, errdb = dbList.PkgCachebyGroup(name)
|
||||
_, errdb := dbList.PkgCachebyGroup(name)
|
||||
found = errdb == nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue