1
0
mirror of https://github.com/Jguer/yay.git synced 2025-08-06 22:57:16 +02:00

fix(query): remove -debug packages from missing list if base package is installed (#2372)

* chore(yay): fix pre-commit

* chore(yay): fix git ignore
This commit is contained in:
Jo 2024-02-19 11:29:47 +01:00 committed by GitHub
parent 92d7cb0faa
commit 26aa171b2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 7 deletions

2
.gitignore vendored
View File

@ -28,3 +28,5 @@ qemu-*
*.pot *.pot
*.po~ *.po~
*.pprof *.pprof
node_modules/

View File

@ -5,19 +5,17 @@ repos:
rev: v0.5.1 rev: v0.5.1
hooks: hooks:
- id: go-fmt - id: go-fmt
- id: go-imports
args: [-local=github.com/Jguer/yay/v12/]
- id: golangci-lint - id: golangci-lint
- id: go-unit-tests - id: go-unit-tests
- id: go-build - id: go-build
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4 # Use the sha or tag you want to point at rev: v4.0.0-alpha.8 # Use the sha or tag you want to point at
hooks: hooks:
- id: prettier - id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 # Use the ref you want to point at rev: v4.5.0 # Use the ref you want to point at
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: check-json - id: check-json
@ -25,7 +23,7 @@ repos:
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/commitizen-tools/commitizen - repo: https://github.com/commitizen-tools/commitizen
rev: v2.38.0 rev: v3.15.0
hooks: hooks:
- id: commitizen - id: commitizen
stages: [commit-msg] stages: [commit-msg]

View File

@ -52,10 +52,14 @@ func (warnings *AURWarnings) AddToWarnings(remote map[string]alpm.IPackage, aurP
} }
} }
func (warnings *AURWarnings) CalculateMissing(remoteNames []string, remote map[string]alpm.IPackage, aurData map[string]*aur.Pkg) { func (warnings *AURWarnings) CalculateMissing(remoteNames []string,
remote map[string]alpm.IPackage, aurData map[string]*aur.Pkg,
) {
for _, name := range remoteNames { for _, name := range remoteNames {
if _, ok := aurData[name]; !ok && !remote[name].ShouldIgnore() { if _, ok := aurData[name]; !ok && !remote[name].ShouldIgnore() {
warnings.Missing = append(warnings.Missing, name) if _, ok := aurData[strings.TrimSuffix(name, "-debug")]; !ok {
warnings.Missing = append(warnings.Missing, name)
}
} }
} }
} }