Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ qemu-*
*.pot
*.po~
*.pprof

node_modules/
8 changes: 3 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,25 @@ repos:
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-imports
args: [-local=github.com/Jguer/yay/v12/]
- id: golangci-lint
- id: go-unit-tests
- id: go-build

- 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:
- id: prettier

- 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:
- id: trailing-whitespace
- id: check-json
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/commitizen-tools/commitizen
rev: v2.38.0
rev: v3.15.0
hooks:
- id: commitizen
stages: [commit-msg]
8 changes: 6 additions & 2 deletions pkg/query/aur_warnings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
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)
}
}
}
}
Expand Down
Loading