Compare commits

...

23 Commits

Author SHA1 Message Date
dependabot[bot]
6f3bc5cc4c
chore(deps): bump golang.org/x/net from 0.40.0 to 0.41.0 in the go-all group (#2632)
chore(deps): bump golang.org/x/net in the go-all group

Bumps the go-all group with 1 update: [golang.org/x/net](https://github.com/golang/net).


Updates `golang.org/x/net` from 0.40.0 to 0.41.0
- [Commits](https://github.com/golang/net/compare/v0.40.0...v0.41.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-11 15:38:14 +02:00
dependabot[bot]
c2caf9c7d7
chore(deps): bump github.com/leonelquinteros/gotext from 1.7.1 to 1.7.2 in the go-all group (#2629)
chore(deps): bump github.com/leonelquinteros/gotext in the go-all group

Bumps the go-all group with 1 update: [github.com/leonelquinteros/gotext](https://github.com/leonelquinteros/gotext).


Updates `github.com/leonelquinteros/gotext` from 1.7.1 to 1.7.2
- [Release notes](https://github.com/leonelquinteros/gotext/releases)
- [Commits](https://github.com/leonelquinteros/gotext/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/leonelquinteros/gotext
  dependency-version: 1.7.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-04 23:45:08 +02:00
transifex-integration[bot]
8615239329
Updates for file po/en.po in zh_CN (#2628)
Translate po/en.po in zh_CN

100% translated source file: 'po/en.po'
on 'zh_CN'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-05-28 14:07:22 +02:00
transifex-integration[bot]
c9a8507654
Updates for file po/en.po in ko (#2626)
* Translate po/en.po in ko

100% translated source file: 'po/en.po'
on 'ko'.

* Translate po/en.po in ko

100% translated source file: 'po/en.po'
on 'ko'.

* Translate po/en.po in ko

100% translated source file: 'po/en.po'
on 'ko'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-05-27 14:59:55 +02:00
dependabot[bot]
75e90c3a6d
chore(deps): bump the go-all group with 2 updates (#2622)
Bumps the go-all group with 2 updates: [golang.org/x/net](https://github.com/golang/net) and [golang.org/x/term](https://github.com/golang/term).


Updates `golang.org/x/net` from 0.39.0 to 0.40.0
- [Commits](https://github.com/golang/net/compare/v0.39.0...v0.40.0)

Updates `golang.org/x/term` from 0.31.0 to 0.32.0
- [Commits](https://github.com/golang/term/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-all
- dependency-name: golang.org/x/term
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-27 12:15:33 +02:00
Jo
8ab3652846
Fix locale initialization logic (#2619)
* Fix locale initialization logic

* add comment

* Update main.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update GitHub Actions workflow for testing

* Update GitHub Actions workflow to allow artifact overwrite

* Update GitHub Actions workflow to allow artifact overwrite

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-06 18:16:47 +02:00
dependabot[bot]
98be3fec97
chore(deps): bump golang.org/x/sys from 0.32.0 to 0.33.0 in the go-all group (#2620)
chore(deps): bump golang.org/x/sys in the go-all group

Bumps the go-all group with 1 update: [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/sys` from 0.32.0 to 0.33.0
- [Commits](https://github.com/golang/sys/compare/v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-06 18:08:17 +02:00
Jo
c6a2226ce1
add locale tooling (#2618) 2025-05-01 22:07:39 +00:00
transifex-integration[bot]
3e82496057
Updates for file po/en.po in hu (#2617)
* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-05-01 23:08:02 +02:00
Jo
a26ac1ba95
Add SECURITY.md with contact and supported version policy (#2616)
* docs: add SECURITY.md with contact and supported version policy

* fix image render
2025-05-01 08:18:31 +00:00
Jo
b745f87210
chore(ci): update golangci lint v2.1.5 (#2615)
* chore(ci): update golangci-lint to v2.1.5 in ci.Dockerfile

* add golangci

* fix lint

* fix lint pkg/upgrade

* reenable lint
2025-05-01 10:00:10 +02:00
dependabot[bot]
b4a41700ee
chore(deps): bump golang.org/x/net from 0.38.0 to 0.39.0 (#2609)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.38.0 to 0.39.0.
- [Commits](https://github.com/golang/net/compare/v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 09:58:03 +02:00
dependabot[bot]
0aa80e521e
chore(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#2612)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-version: 1.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 09:55:03 +02:00
Jo
bce9f2fc72
Update dependabot.yml (#2614) 2025-05-01 09:54:47 +02:00
dependabot[bot]
5a71db2526
chore(deps): bump github.com/deckarep/golang-set/v2 from 2.7.0 to 2.8.0 (#2611)
Bumps [github.com/deckarep/golang-set/v2](https://github.com/deckarep/golang-set) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/deckarep/golang-set/releases)
- [Commits](https://github.com/deckarep/golang-set/compare/v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: github.com/deckarep/golang-set/v2
  dependency-version: 2.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 08:40:49 +02:00
dependabot[bot]
535370bca0
chore(deps): bump golang.org/x/term from 0.30.0 to 0.31.0 (#2613)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.30.0 to 0.31.0.
- [Commits](https://github.com/golang/term/compare/v0.30.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-version: 0.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 08:37:38 +02:00
Jo
9a3be07887
Create dependabot.yml (#2608)
* Create dependabot.yml

* Update dependabot.yml

* Update dependabot.yml
2025-04-30 21:49:38 +00:00
Jo
2f205ee96c
chore(ci): update golangci-lint to v2.1.5 in ci.Dockerfile (#2607) 2025-04-30 21:45:29 +00:00
Jo
1982ce0366
chore(devcontainer): add devcontainer for clean builds (#2606)
chore(devcontainer): set up passwordless sudo for docker user for clean development and testing
2025-04-30 23:08:02 +02:00
Jo
2dcf94544c
refactor(build): optimize allocations and add tests (#2601)
* perf(build): optimize map/slice allocations and use strings.Builder

* test(build): add tests for parsePackageList
2025-04-29 22:45:24 +02:00
Ferdinand Bachmann
95fc0938fd
fix(installer): Fix the same pkgbase being built multiple times on error (#2561)
fix(installer): Fixes the same pkgbase being built multiple times on error

The previous fix commit ec837c8 failed to address the case where the
build fails, as packages are only added to builtPkgDests on a successful
build. This commit addresses this by adding the package to the map earlier.

Fixes #2560.
2025-04-29 22:45:10 +02:00
transifex-integration[bot]
ff176c0dd2
Updates for file po/en.po in hu (#2605)
* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

* Translate po/en.po in hu

100% translated source file: 'po/en.po'
on 'hu'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-04-28 10:17:56 +02:00
Jo
bf315041b1
refactor(upgrade): optimize code and improve maintainability (#2600)
* refactor(upgrade): reduce code duplication in Print methods and fix typo in Filter documentation

* refactor(upgrade): optimize UserExcludeUpgrades with early return and simplify GraphUpgrades function
2025-04-24 12:06:27 +02:00
33 changed files with 543 additions and 281 deletions

26
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,26 @@
# Use the jguer/yay-builder image as a parent image with archlinux
FROM docker.io/jguer/yay-builder
# Install extra packages (pacman-contrib and fish)
RUN sudo pacman -Syu --noconfirm pacman-contrib fish git-delta openssh bat go
# Set passwordless sudo for the docker user
RUN echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/docker
# Create a non-root user and switch to it
USER docker
# Install xgotext
RUN go install github.com/leonelquinteros/gotext/cli/xgotext@latest
# Add /app/bin to the PATH
ENV PATH="/app/bin:$PATH"
# add /home/docker/go/bin to the PATH
ENV PATH="/home/docker/go/bin:$PATH"
# Set the working directory
WORKDIR /workspace
# Command to run when starting the container
CMD ["bash"]

View File

@ -0,0 +1,14 @@
{
"name": "Existing Dockerfile",
"build": {
"context": "..",
"dockerfile": "../.devcontainer/Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"golang.go"
]
}
}
}

15
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
groups:
go-all:
patterns:
- '*'

View File

@ -16,12 +16,13 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: | restore-keys: |
${{ runner.os }}-go- ${{ runner.os }}-go-
# - name: Lint - name: Lint
# env: env:
# GOFLAGS: -buildvcs=false -tags=next GOFLAGS: -buildvcs=false -tags=next
# run: /app/bin/golangci-lint run -v ./... run: /app/bin/golangci-lint run -v ./...
- name: Run Build and Tests - name: Run Build and Tests
run: make test run: make test
- name: Run Integration Tests - name: Run Integration Tests
continue-on-error: true continue-on-error: true
run: | run: |
@ -29,4 +30,15 @@ jobs:
chown -R yay:yay . && chown -R yay:yay . &&
cp -r ~/go/ /home/yay/go/ && cp -r ~/go/ /home/yay/go/ &&
chown -R yay:yay /home/yay/go/ && chown -R yay:yay /home/yay/go/ &&
su yay -c "make test-integration" su yay -c "make test-integration"
- name: Build yay Artifact
env:
GOFLAGS: -buildvcs=false -tags=next
run: make
- name: Upload yay Artifact
uses: actions/upload-artifact@v4
with:
name: yay
path: ./yay
if-no-files-found: error
overwrite: true

View File

@ -1,67 +1,18 @@
linters-settings: version: "2"
dupl: run:
threshold: 100 go: "1.20"
funlen:
lines: 100
statements: 50
goconst:
min-len: 3
min-occurrences: 4
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
gocyclo:
min-complexity: 15
goimports:
local-prefixes: github.com/Jguer/yay/v12
gomnd:
checks:
- argument
- case
- condition
- return
ignored-numbers:
- "0"
- "1"
- "2"
- "3"
ignored-functions:
- strings.SplitN
lll:
line-length: 140
misspell:
locale: US
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
linters: linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon. default: none
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable: enable:
- forbidigo
- bodyclose - bodyclose
- dogsled - dogsled
- dupl - dupl
- errorlint
- errcheck - errcheck
# - funlen # TOFIX - errorlint
- gochecknoinits - gochecknoinits
# - goconst # TOFIX
- gocritic - gocritic
# - gocyclo # TOFIX
- gofmt
- goimports
# - gomnd # TOFIX
- goprintffuncname - goprintffuncname
- gosec - gosec
- gosimple
- govet - govet
- ineffassign - ineffassign
- lll - lll
@ -70,36 +21,74 @@ linters:
- noctx - noctx
- nolintlint - nolintlint
- staticcheck - staticcheck
- stylecheck
- typecheck
- unconvert - unconvert
- unparam - unparam
- unused - unused
- whitespace - whitespace
settings:
run: dupl:
go: "1.20" threshold: 100
timeout: "10m" funlen:
forbidigo: lines: 100
forbid: statements: 50
- p: ^fmt\.Print.*$ goconst:
msg: Do not commit print statements. min-len: 3
min-occurrences: 4
issues: gocritic:
exclude-rules: enabled-tags:
- path: (.+)_test.go - diagnostic
linters: - experimental
- lll - opinionated
- revive - performance
- wsl - style
- govet gocyclo:
- godot min-complexity: 15
- errcheck lll:
- stylecheck line-length: 140
- dupl misspell:
- gocritic locale: US
- gochecknoinits nolintlint:
- errorlint require-explanation: false
require-specific: false
exclude: allow-unused: false
- G204 exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
- errcheck
- errorlint
- gochecknoinits
- gocritic
- godot
- govet
- lll
- revive
- staticcheck
- wsl
path: (.+)_test.go
- path: (.+)\.go$
text: G204
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/Jguer/yay/v12
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$

7
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"go.lintTool": "golangci-lint",
"gopls": {
"formatting.gofumpt": true,
"formatting.local": "github.com/Jguer/yay/v12"
}
}

View File

@ -172,14 +172,14 @@ tools.
## Images ## Images
<p float="left"> <p align="center">
<img src="https://rawcdn.githack.com/Jguer/jguer.github.io/77647f396cb7156fd32e30970dbeaf6d6dc7f983/yay/yay.png" width="42%"/> <img src="https://raw.githubusercontent.com/Jguer/jguer.github.io/refs/heads/master/yay/yay.png" width="42%">
<img src="https://rawcdn.githack.com/Jguer/jguer.github.io/77647f396cb7156fd32e30970dbeaf6d6dc7f983/yay/yay-s.png" width="42%"/> <img src="https://raw.githubusercontent.com/Jguer/jguer.github.io/refs/heads/master/yay/yay-s.png" width="42%">
</p> </p>
<p float="left"> <p align="center">
<img src="https://rawcdn.githack.com/Jguer/jguer.github.io/77647f396cb7156fd32e30970dbeaf6d6dc7f983/yay/yay-y.png" width="42%"/> <img src="https://raw.githubusercontent.com/Jguer/jguer.github.io/refs/heads/master/yay/yay-y.png" width="42%">
<img src="https://rawcdn.githack.com/Jguer/jguer.github.io/77647f396cb7156fd32e30970dbeaf6d6dc7f983/yay/yay-ps.png" width="42%"/> <img src="https://raw.githubusercontent.com/Jguer/jguer.github.io/refs/heads/master/yay/yay-ps.png" width="42%">
</p> </p>
### Other AUR helpers/tools ### Other AUR helpers/tools

13
SECURITY.md Normal file
View File

@ -0,0 +1,13 @@
# Security Policy
Thank you for helping keep yay secure!
## Supported Versions
We only provide security updates and support for the latest released version of yay. Please ensure you are using the most up-to-date version before reporting vulnerabilities.
## Reporting a Vulnerability
If you discover a security vulnerability, please email us at [security@jguer.space](mailto:security@jguer.space). We will respond as quickly as possible and coordinate a fix.
We appreciate responsible disclosure and your help in making this project safe for everyone.

View File

@ -11,5 +11,5 @@ COPY go.mod .
RUN pacman-key --init && pacman -Sy && pacman -S --overwrite=* --noconfirm archlinux-keyring && \ RUN pacman-key --init && pacman -Sy && pacman -S --overwrite=* --noconfirm archlinux-keyring && \
pacman -Su --overwrite=* --needed --noconfirm pacman doxygen meson asciidoc go git gcc make sudo base-devel && \ pacman -Su --overwrite=* --needed --noconfirm pacman doxygen meson asciidoc go git gcc make sudo base-devel && \
rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/* && \ rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/* && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.64.6 && \ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v2.1.5 && \
go mod download go mod download

View File

@ -55,9 +55,10 @@ func syncClean(ctx context.Context, run *runtime.Runtime, cmdArgs *parser.Argume
_, removeAll, _ := cmdArgs.GetArg("c", "clean") _, removeAll, _ := cmdArgs.GetArg("c", "clean")
for _, v := range run.PacmanConf.CleanMethod { for _, v := range run.PacmanConf.CleanMethod {
if v == "KeepInstalled" { switch v {
case "KeepInstalled":
keepInstalled = true keepInstalled = true
} else if v == "KeepCurrent" { case "KeepCurrent":
keepCurrent = true keepCurrent = true
} }
} }

12
go.mod
View File

@ -8,13 +8,13 @@ require (
github.com/Morganamilo/go-srcinfo v1.0.0 github.com/Morganamilo/go-srcinfo v1.0.0
github.com/adrg/strutil v0.3.1 github.com/adrg/strutil v0.3.1
github.com/bradleyjkemp/cupaloy v2.3.0+incompatible github.com/bradleyjkemp/cupaloy v2.3.0+incompatible
github.com/deckarep/golang-set/v2 v2.7.0 github.com/deckarep/golang-set/v2 v2.8.0
github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-multierror v1.1.1
github.com/leonelquinteros/gotext v1.7.1 github.com/leonelquinteros/gotext v1.7.2
github.com/stretchr/testify v1.9.0 github.com/stretchr/testify v1.10.0
golang.org/x/net v0.38.0 golang.org/x/net v0.41.0
golang.org/x/sys v0.31.0 golang.org/x/sys v0.33.0
golang.org/x/term v0.30.0 golang.org/x/term v0.32.0
gopkg.in/h2non/gock.v1 v1.1.2 gopkg.in/h2non/gock.v1 v1.1.2
) )

24
go.sum
View File

@ -17,8 +17,8 @@ github.com/bradleyjkemp/cupaloy v2.3.0+incompatible/go.mod h1:Au1Xw1sgaJ5iSFktEh
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deckarep/golang-set/v2 v2.7.0 h1:gIloKvD7yH2oip4VLhsv3JyLLFnC0Y2mlusgcvJYW5k= github.com/deckarep/golang-set/v2 v2.8.0 h1:swm0rlPCmdWn9mESxKOjWk8hXSqoxOp+ZlfuyaAdFlQ=
github.com/deckarep/golang-set/v2 v2.7.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/deckarep/golang-set/v2 v2.8.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@ -30,8 +30,8 @@ github.com/itchyny/gojq v0.12.17 h1:8av8eGduDb5+rvEdaOO+zQUjA04MS0m3Ps8HiD+fceg=
github.com/itchyny/gojq v0.12.17/go.mod h1:WBrEMkgAfAGO1LUcGOckBl5O726KPp+OlkKug0I/FEY= github.com/itchyny/gojq v0.12.17/go.mod h1:WBrEMkgAfAGO1LUcGOckBl5O726KPp+OlkKug0I/FEY=
github.com/itchyny/timefmt-go v0.1.6 h1:ia3s54iciXDdzWzwaVKXZPbiXzxxnv1SPGFfM/myJ5Q= github.com/itchyny/timefmt-go v0.1.6 h1:ia3s54iciXDdzWzwaVKXZPbiXzxxnv1SPGFfM/myJ5Q=
github.com/itchyny/timefmt-go v0.1.6/go.mod h1:RRDZYC5s9ErkjQvTvvU7keJjxUYzIISJGxm9/mAERQg= github.com/itchyny/timefmt-go v0.1.6/go.mod h1:RRDZYC5s9ErkjQvTvvU7keJjxUYzIISJGxm9/mAERQg=
github.com/leonelquinteros/gotext v1.7.1 h1:/JNPeE3lY5JeVYv2+KBpz39994W3W9fmZCGq3eO9Ri8= github.com/leonelquinteros/gotext v1.7.2 h1:bDPndU8nt+/kRo1m4l/1OXiiy2v7Z7dfPQ9+YP7G1Mc=
github.com/leonelquinteros/gotext v1.7.1/go.mod h1:I0WoFDn9u2D3VbPnnDPT8mzZu0iSXG8iih+AH2fHHqg= github.com/leonelquinteros/gotext v1.7.2/go.mod h1:9/haCkm5P7Jay1sxKDGJ5WIg4zkz8oZKw4ekNpALob8=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
@ -51,14 +51,14 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=

View File

@ -43,7 +43,7 @@ func srcinfoExists(ctx context.Context,
return fmt.Errorf("unable to generate .SRCINFO: %w - %s", err, stderr) return fmt.Errorf("unable to generate .SRCINFO: %w - %s", err, stderr)
} }
if len(srcinfo) == 0 { if srcinfo == "" {
return fmt.Errorf("generated .SRCINFO is empty, check your PKGBUILD for errors") return fmt.Errorf("generated .SRCINFO is empty, check your PKGBUILD for errors")
} }

View File

@ -6,6 +6,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"runtime/debug" "runtime/debug"
"strings"
"github.com/leonelquinteros/gotext" "github.com/leonelquinteros/gotext"
@ -27,7 +28,12 @@ func initGotext() {
} }
if lc := os.Getenv("LANGUAGE"); lc != "" { if lc := os.Getenv("LANGUAGE"); lc != "" {
gotext.Configure(localePath, lc, "yay") // Split LANGUAGE by ':' and prioritize the first locale
// Should fix in gotext to support this
locales := strings.Split(lc, ":")
if len(locales) > 0 && locales[0] != "" {
gotext.Configure(localePath, locales[0], "yay")
}
} else if lc := os.Getenv("LC_ALL"); lc != "" { } else if lc := os.Getenv("LC_ALL"); lc != "" {
gotext.Configure(localePath, lc, "yay") gotext.Configure(localePath, lc, "yay")
} else if lc := os.Getenv("LC_MESSAGES"); lc != "" { } else if lc := os.Getenv("LC_MESSAGES"); lc != "" {

View File

@ -37,7 +37,7 @@ func (i *InstallInfo) String() string {
} }
type ( type (
Reason int Reason uint
Source int Source int
) )
@ -804,17 +804,17 @@ func makeAURPKGFromSrcinfo(dbExecutor db.Executor, srcInfo *gosrc.Srcinfo) ([]*a
Description: getDesc(pkg), Description: getDesc(pkg),
URL: pkg.URL, URL: pkg.URL,
Depends: append(archStringToString(alpmArch, pkg.Depends), Depends: append(archStringToString(alpmArch, pkg.Depends),
archStringToString(alpmArch, srcInfo.Package.Depends)...), archStringToString(alpmArch, srcInfo.Depends)...),
MakeDepends: archStringToString(alpmArch, srcInfo.PackageBase.MakeDepends), MakeDepends: archStringToString(alpmArch, srcInfo.MakeDepends),
CheckDepends: archStringToString(alpmArch, srcInfo.PackageBase.CheckDepends), CheckDepends: archStringToString(alpmArch, srcInfo.CheckDepends),
Conflicts: append(archStringToString(alpmArch, pkg.Conflicts), Conflicts: append(archStringToString(alpmArch, pkg.Conflicts),
archStringToString(alpmArch, srcInfo.Package.Conflicts)...), archStringToString(alpmArch, srcInfo.Conflicts)...),
Provides: append(archStringToString(alpmArch, pkg.Provides), Provides: append(archStringToString(alpmArch, pkg.Provides),
archStringToString(alpmArch, srcInfo.Package.Provides)...), archStringToString(alpmArch, srcInfo.Provides)...),
Replaces: append(archStringToString(alpmArch, pkg.Replaces), Replaces: append(archStringToString(alpmArch, pkg.Replaces),
archStringToString(alpmArch, srcInfo.Package.Replaces)...), archStringToString(alpmArch, srcInfo.Replaces)...),
OptDepends: append(archStringToString(alpmArch, pkg.OptDepends), OptDepends: append(archStringToString(alpmArch, pkg.OptDepends),
archStringToString(alpmArch, srcInfo.Package.OptDepends)...), archStringToString(alpmArch, srcInfo.OptDepends)...),
Groups: pkg.Groups, Groups: pkg.Groups,
License: pkg.License, License: pkg.License,
Keywords: []string{}, Keywords: []string{},

View File

@ -17,10 +17,10 @@ type IntRange struct {
// IntRanges is a slice of IntRange. // IntRanges is a slice of IntRange.
type IntRanges []IntRange type IntRanges []IntRange
func makeIntRange(min, max int) IntRange { func makeIntRange(minVal, maxVal int) IntRange {
return IntRange{ return IntRange{
min, min: minVal,
max, max: maxVal,
} }
} }

View File

@ -64,9 +64,9 @@ func TestParseNumberMenu(t *testing.T) {
}, },
mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string](),
}, },
{IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet[string]("abort", "all", "none"), mapset.NewThreadUnsafeSet[string]()}, {IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet("abort", "all", "none"), mapset.NewThreadUnsafeSet[string]()},
{IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet[string]("a-b"), mapset.NewThreadUnsafeSet[string]("abort", "a-b")}, {IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet("a-b"), mapset.NewThreadUnsafeSet("abort", "a-b")},
{IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet[string]("-9223372036854775809-9223372036854775809"), mapset.NewThreadUnsafeSet[string]()}, {IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet("-9223372036854775809-9223372036854775809"), mapset.NewThreadUnsafeSet[string]()},
{IntRanges{ {IntRanges{
makeIntRange(1, 1), makeIntRange(1, 1),
makeIntRange(2, 2), makeIntRange(2, 2),
@ -86,7 +86,7 @@ func TestParseNumberMenu(t *testing.T) {
}, IntRanges{}, mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string]()}, }, IntRanges{}, mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string]()},
{IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string]()}, {IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string]()},
{IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string]()}, {IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string]()},
{IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet[string]("a", "b", "c", "d", "e"), mapset.NewThreadUnsafeSet[string]()}, {IntRanges{}, IntRanges{}, mapset.NewThreadUnsafeSet("a", "b", "c", "d", "e"), mapset.NewThreadUnsafeSet[string]()},
} }
for n, in := range inputs { for n, in := range inputs {

View File

@ -289,7 +289,7 @@ func matchesSearch(pkg *aur.Pkg, terms []string) bool {
desc := strings.ToLower(pkg.Description) desc := strings.ToLower(pkg.Description)
targ := strings.ToLower(pkgN) targ := strings.ToLower(pkgN)
if !(strings.Contains(name, targ) || strings.Contains(desc, targ)) { if !strings.Contains(name, targ) && !strings.Contains(desc, targ) {
return false return false
} }
} }

View File

@ -37,7 +37,7 @@ func GetVersionDiff(oldVersion, newVersion string) (left, right string) {
} }
for index, char := range oldVersion { for index, char := range oldVersion {
charIsSpecial := !(unicode.IsLetter(char) || unicode.IsNumber(char)) charIsSpecial := !unicode.IsLetter(char) && !unicode.IsNumber(char)
if (index >= len(newVersion)) || (char != rune(newVersion[index])) { if (index >= len(newVersion)) || (char != rune(newVersion[index])) {
if charIsSpecial { if charIsSpecial {

View File

@ -173,11 +173,12 @@ func (c *CmdBuilder) deElevateCommand(ctx context.Context, cmd *exec.Cmd) *exec.
if userFound, err := user.Lookup(ogCaller); err == nil { if userFound, err := user.Lookup(ogCaller); err == nil {
cmd.SysProcAttr = &syscall.SysProcAttr{} cmd.SysProcAttr = &syscall.SysProcAttr{}
uid, _ := strconv.Atoi(userFound.Uid) uid64, errUid := strconv.ParseUint(userFound.Uid, 10, 32)
gid, _ := strconv.Atoi(userFound.Gid) gid64, errGid := strconv.ParseUint(userFound.Gid, 10, 32)
cmd.SysProcAttr.Credential = &syscall.Credential{Uid: uint32(uid), Gid: uint32(gid)} if errUid == nil && errGid == nil {
cmd.SysProcAttr.Credential = &syscall.Credential{Uid: uint32(uid64), Gid: uint32(gid64)}
return cmd return cmd
}
} }
cmdArgs := []string{ cmdArgs := []string{

View File

@ -25,7 +25,7 @@ func (o *Option) Add(args ...string) {
} }
func (o *Option) First() string { func (o *Option) First() string {
if o.Args == nil || len(o.Args) == 0 { if len(o.Args) == 0 {
return "" return ""
} }
@ -565,7 +565,6 @@ func (a *Arguments) parseShortOption(arg, param string) (usedNext bool, err erro
break break
} else { } else {
err = a.AddArg(char) err = a.AddArg(char)
if err != nil { if err != nil {
return return
} }

View File

@ -2,6 +2,7 @@ package build
import ( import (
"errors" "errors"
"strings"
"github.com/leonelquinteros/gotext" "github.com/leonelquinteros/gotext"
) )
@ -13,13 +14,17 @@ type FailedIgnoredPkgError struct {
} }
func (e *FailedIgnoredPkgError) Error() string { func (e *FailedIgnoredPkgError) Error() string {
msg := gotext.Get("Failed to install the following packages. Manual intervention is required:") var sb strings.Builder
sb.WriteString(gotext.Get("Failed to install the following packages. Manual intervention is required:"))
for pkg, err := range e.pkgErrors { for pkg, err := range e.pkgErrors {
msg += "\n" + pkg + " - " + err.Error() sb.WriteString("\n")
sb.WriteString(pkg)
sb.WriteString(" - ")
sb.WriteString(err.Error())
} }
return msg return sb.String()
} }
type PkgDestNotInListError struct { type PkgDestNotInListError struct {

View File

@ -145,7 +145,7 @@ func (installer *Installer) handleLayer(ctx context.Context,
excluded []string, excluded []string,
) error { ) error {
// Install layer // Install layer
nameToBaseMap := make(map[string]string, 0) nameToBaseMap := make(map[string]string, len(layer))
syncDeps, syncExp, syncGroups := mapset.NewThreadUnsafeSet[string](), syncDeps, syncExp, syncGroups := mapset.NewThreadUnsafeSet[string](),
mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string]() mapset.NewThreadUnsafeSet[string](), mapset.NewThreadUnsafeSet[string]()
aurDeps, aurExp, aurOrigTargetBases := mapset.NewThreadUnsafeSet[string](), aurDeps, aurExp, aurOrigTargetBases := mapset.NewThreadUnsafeSet[string](),
@ -225,8 +225,9 @@ func (installer *Installer) installAURPackages(ctx context.Context,
} }
builtPkgDests := make(map[string]map[string]string) builtPkgDests := make(map[string]map[string]string)
deps, exps := make([]string, 0, aurDepNames.Cardinality()), make([]string, 0, aurExpNames.Cardinality()) deps := make([]string, 0, aurDepNames.Cardinality())
pkgArchives := make([]string, 0, len(exps)+len(deps)) exps := make([]string, 0, aurExpNames.Cardinality())
pkgArchives := make([]string, 0, len(all))
for _, name := range all { for _, name := range all {
base := nameToBase[name] base := nameToBase[name]
@ -240,6 +241,7 @@ func (installer *Installer) installAURPackages(ctx context.Context,
installer.log.Debugln("building pkgbase", base, "package", name) installer.log.Debugln("building pkgbase", base, "package", name)
pkgdests, errMake = installer.buildPkg(ctx, dir, base, pkgdests, errMake = installer.buildPkg(ctx, dir, base,
installIncompatible, cmdArgs.ExistsArg("needed"), aurOrigTargetBases.Contains(base)) installIncompatible, cmdArgs.ExistsArg("needed"), aurOrigTargetBases.Contains(base))
builtPkgDests[base] = pkgdests
if errMake != nil { if errMake != nil {
if !lastLayer { if !lastLayer {
return fmt.Errorf("%s - %w", gotext.Get("error making: %s", base), errMake) return fmt.Errorf("%s - %w", gotext.Get("error making: %s", base), errMake)
@ -249,8 +251,6 @@ func (installer *Installer) installAURPackages(ctx context.Context,
installer.log.Errorln(gotext.Get("error making: %s", base), "-", errMake) installer.log.Errorln(gotext.Get("error making: %s", base), "-", errMake)
continue continue
} }
builtPkgDests[base] = pkgdests
} }
if len(pkgdests) == 0 { if len(pkgdests) == 0 {

View File

@ -612,8 +612,18 @@ func TestInstaller_CompileFailed(t *testing.T) {
failed, err := installer.CompileFailedAndIgnored() failed, err := installer.CompileFailedAndIgnored()
if tc.wantErrCompile { if tc.wantErrCompile {
require.Error(td, err) require.Error(td, err)
assert.ErrorContains(td, err, "yay") for key := range failed {
assert.Len(t, failed, len(tc.targets)) assert.ErrorContains(td, err, key)
}
uniqueBases := make(map[string]struct{})
for _, layer := range tc.targets {
for _, info := range layer {
if info.AURBase != nil {
uniqueBases[*info.AURBase] = struct{}{}
}
}
}
require.Len(td, failed, len(uniqueBases))
} else { } else {
require.NoError(td, err) require.NoError(td, err)
} }

View File

@ -134,7 +134,7 @@ func parsePackageList(ctx context.Context, cmdBuilder exe.ICmdBuilder,
} }
lines := strings.Split(stdout, "\n") lines := strings.Split(stdout, "\n")
pkgdests = make(map[string]string) pkgdests = make(map[string]string, len(lines))
for _, line := range lines { for _, line := range lines {
if line == "" { if line == "" {

View File

@ -0,0 +1,167 @@
package build
import (
"context"
"fmt"
"os/exec"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/Jguer/yay/v12/pkg/settings/exe"
)
func TestParsePackageList(t *testing.T) {
t.Parallel()
type testCase struct {
desc string
mockStdout string
mockStderr string
mockErr error
wantPkgDests map[string]string
wantPkgVersion string
wantErr bool
wantErrText string // Optional: specific error text to check
}
testCases := []testCase{
{
desc: "Standard package",
mockStdout: "/path/to/package-1.2.3-4-x86_64.pkg.tar.zst\n",
wantPkgDests: map[string]string{
"package": "/path/to/package-1.2.3-4-x86_64.pkg.tar.zst",
},
wantPkgVersion: "1.2.3-4",
wantErr: false,
},
{
desc: "Package with dash in name",
mockStdout: "/path/to/package-name-with-dash-1.0.0-1-any.pkg.tar.gz\n",
wantPkgDests: map[string]string{
"package-name-with-dash": "/path/to/package-name-with-dash-1.0.0-1-any.pkg.tar.gz",
},
wantPkgVersion: "1.0.0-1",
wantErr: false, // This should fail with current logic but pass with regex
},
{
desc: "Multiple packages",
mockStdout: "/path/to/pkg1-1.0-1-x86_64.pkg.tar.zst\n/other/path/pkg2-2.5-3-any.pkg.tar.xz\n",
wantPkgDests: map[string]string{
"pkg1": "/path/to/pkg1-1.0-1-x86_64.pkg.tar.zst",
"pkg2": "/other/path/pkg2-2.5-3-any.pkg.tar.xz",
},
wantPkgVersion: "2.5-3", // Version of the last package processed
wantErr: false,
},
{
desc: "Empty input",
mockStdout: "",
wantErr: true, // Expect NoPkgDestsFoundError
},
{
desc: "Input with only newline",
mockStdout: "\n",
wantErr: true, // Expect NoPkgDestsFoundError
},
{
desc: "Makepkg error",
mockStderr: "makepkg failed",
mockErr: fmt.Errorf("exit status 1"),
wantErr: true,
},
{
desc: "Malformed filename (too few dashes)",
mockStdout: "/path/to/malformed-package.pkg.tar.zst\n",
wantErr: true, // Expect "cannot find package name" error
},
{
desc: "Package with epoch",
mockStdout: "/path/to/epochpkg-1:2.0.0-1-x86_64.pkg.tar.zst\n",
wantPkgDests: map[string]string{
"epochpkg": "/path/to/epochpkg-1:2.0.0-1-x86_64.pkg.tar.zst",
},
wantPkgVersion: "1:2.0.0-1",
wantErr: false, // This might fail with current logic
},
{
desc: "Package with .zst extension",
mockStdout: "/path/to/zstdpkg-3.3-1-any.pkg.tar.zst\n",
wantPkgDests: map[string]string{
"zstdpkg": "/path/to/zstdpkg-3.3-1-any.pkg.tar.zst",
},
wantPkgVersion: "3.3-1",
wantErr: false,
},
{
desc: "Package with .gz extension",
mockStdout: "/path/to/gzpkg-3.3-1-any.pkg.tar.gz\n",
wantPkgDests: map[string]string{
"gzpkg": "/path/to/gzpkg-3.3-1-any.pkg.tar.gz",
},
wantPkgVersion: "3.3-1",
wantErr: false,
},
{
desc: "Package with .xz extension",
mockStdout: "/path/to/xzpkg-3.3-1-any.pkg.tar.xz\n",
wantPkgDests: map[string]string{
"xzpkg": "/path/to/xzpkg-3.3-1-any.pkg.tar.xz",
},
wantPkgVersion: "3.3-1",
wantErr: false,
},
{
desc: "Package with .bz2 extension",
mockStdout: "/path/to/bz2pkg-3.3-1-any.pkg.tar.bz2\n",
wantPkgDests: map[string]string{
"bz2pkg": "/path/to/bz2pkg-3.3-1-any.pkg.tar.bz2",
},
wantPkgVersion: "3.3-1",
wantErr: false,
},
{
desc: "Package with .tar extension (uncompressed)",
mockStdout: "/path/to/tarpkg-3.3-1-any.pkg.tar\n",
wantPkgDests: map[string]string{
"tarpkg": "/path/to/tarpkg-3.3-1-any.pkg.tar",
},
wantPkgVersion: "3.3-1",
wantErr: false,
},
}
for _, tc := range testCases {
tc := tc // capture range variable
t.Run(tc.desc, func(t *testing.T) {
t.Parallel()
mockRunner := &exe.MockRunner{
CaptureFn: func(cmd *exec.Cmd) (string, string, error) {
// Basic check to ensure the command looks right
require.Contains(t, cmd.String(), "--packagelist")
return tc.mockStdout, tc.mockStderr, tc.mockErr
},
}
cmdBuilder := &exe.CmdBuilder{Runner: mockRunner} // Simplified for this test
pkgdests, pkgVersion, err := parsePackageList(context.Background(), cmdBuilder, "/fake/dir")
if tc.wantErr {
assert.Error(t, err)
if tc.wantErrText != "" {
assert.Contains(t, err.Error(), tc.wantErrText)
}
// Check for specific error types if needed
if tc.desc == "Empty input" || tc.desc == "Input with only newline" {
assert.IsType(t, &NoPkgDestsFoundError{}, err)
}
} else {
assert.NoError(t, err)
assert.Equal(t, tc.wantPkgDests, pkgdests)
assert.Equal(t, tc.wantPkgVersion, pkgVersion)
}
})
}
}

View File

@ -194,14 +194,15 @@ func (preper *Preparer) PrepareWorkspace(ctx context.Context,
for _, layer := range targets { for _, layer := range targets {
for _, info := range layer { for _, info := range layer {
if info.Source == dep.AUR { switch info.Source {
case dep.AUR:
pkgBase := *info.AURBase pkgBase := *info.AURBase
pkgBuildDir := filepath.Join(preper.cfg.BuildDir, pkgBase) pkgBuildDir := filepath.Join(preper.cfg.BuildDir, pkgBase)
if preper.needToCloneAURBase(info, pkgBuildDir) { if preper.needToCloneAURBase(info, pkgBuildDir) {
aurBasesToClone.Add(pkgBase) aurBasesToClone.Add(pkgBase)
} }
pkgBuildDirsByBase[pkgBase] = pkgBuildDir pkgBuildDirsByBase[pkgBase] = pkgBuildDir
} else if info.Source == dep.SrcInfo { case dep.SrcInfo:
pkgBase := *info.AURBase pkgBase := *info.AURBase
pkgBuildDirsByBase[pkgBase] = *info.SrcinfoPath pkgBuildDirsByBase[pkgBase] = *info.SrcinfoPath
} }

View File

@ -23,12 +23,12 @@ func SplitDBFromName(pkg string) (db, name string) {
// LessRunes compares two rune values, and returns true if the first argument is lexicographicaly smaller. // LessRunes compares two rune values, and returns true if the first argument is lexicographicaly smaller.
func LessRunes(iRunes, jRunes []rune) bool { func LessRunes(iRunes, jRunes []rune) bool {
max := len(iRunes) maxLen := len(iRunes)
if max > len(jRunes) { if maxLen > len(jRunes) {
max = len(jRunes) maxLen = len(jRunes)
} }
for idx := 0; idx < max; idx++ { for idx := 0; idx < maxLen; idx++ {
ir := iRunes[idx] ir := iRunes[idx]
jr := jRunes[idx] jr := jRunes[idx]

View File

@ -201,7 +201,8 @@ func (u *UpgradeService) graphToUpSlice(graph *topo.Graph[string, *dep.InstallIn
extra = fmt.Sprintf(" (%s of %s)", dep.ReasonNames[info.Reason], strings.Join(reducedParents, ", ")) extra = fmt.Sprintf(" (%s of %s)", dep.ReasonNames[info.Reason], strings.Join(reducedParents, ", "))
} }
if info.Source == dep.AUR { switch info.Source {
case dep.AUR:
aurRepo := "aur" aurRepo := "aur"
if info.Devel { if info.Devel {
aurRepo = "devel" aurRepo = "devel"
@ -215,7 +216,7 @@ func (u *UpgradeService) graphToUpSlice(graph *topo.Graph[string, *dep.InstallIn
Reason: alpmReason, Reason: alpmReason,
Extra: extra, Extra: extra,
}) })
} else if info.Source == dep.Sync { case dep.Sync:
repoUp.Up = append(repoUp.Up, Upgrade{ repoUp.Up = append(repoUp.Up, Upgrade{
Name: name, Name: name,
RemoteVersion: info.Version, RemoteVersion: info.Version,
@ -245,10 +246,6 @@ func (u *UpgradeService) GraphUpgrades(ctx context.Context,
return graph, err return graph, err
} }
if graph.Len() == 0 {
return graph, nil
}
return graph, nil return graph, nil
} }
@ -306,6 +303,11 @@ func (u *UpgradeService) UserExcludeUpgrades(graph *topo.Graph[string, *dep.Inst
// true if user doesn't want to include specific repositories/packages // true if user doesn't want to include specific repositories/packages
noIncludes := len(include) == 0 && otherInclude.Cardinality() == 0 noIncludes := len(include) == 0 && otherInclude.Cardinality() == 0
// No exclusions or inclusions specified, return early
if noIncludes && len(exclude) == 0 && otherExclude.Cardinality() == 0 {
return []string{}, nil
}
excluded := make([]string, 0) excluded := make([]string, 0)
for i := range allUp.Up { for i := range allUp.Up {
up := &allUp.Up[i] up := &allUp.Up[i]

View File

@ -9,7 +9,7 @@ import (
"github.com/Jguer/yay/v12/pkg/text" "github.com/Jguer/yay/v12/pkg/text"
) )
// Filter decides if specific package should be included in theincluded in the results. // Filter decides if specific package should be included in the results.
type Filter func(*Upgrade) bool type Filter func(*Upgrade) bool
// Upgrade type describes a system upgrade. // Upgrade type describes a system upgrade.
@ -38,9 +38,10 @@ func (u UpSlice) Less(i, j int) bool {
} }
for _, db := range u.Repos { for _, db := range u.Repos {
if db == u.Up[i].Repository { switch db {
case u.Up[i].Repository:
return true return true
} else if db == u.Up[j].Repository { case u.Up[j].Repository:
return false return false
} }
} }
@ -51,12 +52,10 @@ func (u UpSlice) Less(i, j int) bool {
return text.LessRunes(iRunes, jRunes) return text.LessRunes(iRunes, jRunes)
} }
// Print prints the details of the packages to upgrade. // calculateFormatting calculates formatting parameters for printing upgrades
func (u UpSlice) Print(logger *text.Logger) { func calculateFormatting(upgrades []Upgrade) (longestName, longestVersion, longestNumber int) {
longestName, longestVersion := 0, 0 for i := range upgrades {
upgrade := &upgrades[i]
for k := range u.Up {
upgrade := &u.Up[k]
packNameLen := len(StylizedNameWithRepository(upgrade)) packNameLen := len(StylizedNameWithRepository(upgrade))
packVersion, _ := query.GetVersionDiff(upgrade.LocalVersion, upgrade.RemoteVersion) packVersion, _ := query.GetVersionDiff(upgrade.LocalVersion, upgrade.RemoteVersion)
packVersionLen := len(packVersion) packVersionLen := len(packVersion)
@ -64,8 +63,16 @@ func (u UpSlice) Print(logger *text.Logger) {
longestVersion = max(packVersionLen, longestVersion) longestVersion = max(packVersionLen, longestVersion)
} }
lenUp := len(u.Up) lenUp := len(upgrades)
longestNumber := len(fmt.Sprintf("%v", lenUp)) longestNumber = len(fmt.Sprintf("%v", lenUp))
return
}
// Print prints the details of the packages to upgrade.
func (u UpSlice) Print(logger *text.Logger) {
longestName, longestVersion, longestNumber := calculateFormatting(u.Up)
namePadding := fmt.Sprintf("%%-%ds ", longestName) namePadding := fmt.Sprintf("%%-%ds ", longestName)
versionPadding := fmt.Sprintf("%%-%ds", longestVersion) versionPadding := fmt.Sprintf("%%-%ds", longestVersion)
numberPadding := fmt.Sprintf("%%%dd ", longestNumber) numberPadding := fmt.Sprintf("%%%dd ", longestNumber)
@ -74,10 +81,8 @@ func (u UpSlice) Print(logger *text.Logger) {
upgrade := &u.Up[k] upgrade := &u.Up[k]
left, right := query.GetVersionDiff(upgrade.LocalVersion, upgrade.RemoteVersion) left, right := query.GetVersionDiff(upgrade.LocalVersion, upgrade.RemoteVersion)
logger.Printf(text.Magenta(fmt.Sprintf(numberPadding, lenUp-k))) logger.Printf(text.Magenta(fmt.Sprintf(numberPadding, len(u.Up)-k)))
logger.Printf(namePadding, StylizedNameWithRepository(upgrade)) logger.Printf(namePadding, StylizedNameWithRepository(upgrade))
logger.Printf("%s -> %s\n", fmt.Sprintf(versionPadding, left), right) logger.Printf("%s -> %s\n", fmt.Sprintf(versionPadding, left), right)
if upgrade.Extra != "" { if upgrade.Extra != "" {
logger.Println(strings.Repeat(" ", longestNumber), upgrade.Extra) logger.Println(strings.Repeat(" ", longestNumber), upgrade.Extra)
@ -86,19 +91,8 @@ func (u UpSlice) Print(logger *text.Logger) {
} }
func (u UpSlice) PrintDeps(logger *text.Logger) { func (u UpSlice) PrintDeps(logger *text.Logger) {
longestName, longestVersion := 0, 0 longestName, longestVersion, longestNumber := calculateFormatting(u.PulledDeps)
for k := range u.PulledDeps {
upgrade := &u.PulledDeps[k]
packNameLen := len(StylizedNameWithRepository(upgrade))
packVersion, _ := query.GetVersionDiff(upgrade.LocalVersion, upgrade.RemoteVersion)
packVersionLen := len(packVersion)
longestName = max(packNameLen, longestName)
longestVersion = max(packVersionLen, longestVersion)
}
lenUp := len(u.PulledDeps)
longestNumber := len(fmt.Sprintf("%v", lenUp))
namePadding := fmt.Sprintf(" %s%%-%ds ", strings.Repeat(" ", longestNumber), longestName) namePadding := fmt.Sprintf(" %s%%-%ds ", strings.Repeat(" ", longestNumber), longestName)
versionPadding := fmt.Sprintf("%%-%ds", longestVersion) versionPadding := fmt.Sprintf("%%-%ds", longestVersion)

View File

@ -2,11 +2,11 @@
# Translators: # Translators:
# Szigeti Péter, 2021 # Szigeti Péter, 2021
# Gergő Kasza, 2022 # Gergő Kasza, 2022
# summoner001, 2024 # summoner001, 2025
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Last-Translator: summoner001, 2024\n" "Last-Translator: summoner001, 2025\n"
"Language-Team: Hungarian (https://app.transifex.com/yay-1/teams/123732/hu/)\n" "Language-Team: Hungarian (https://app.transifex.com/yay-1/teams/123732/hu/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -135,7 +135,7 @@ msgstr "(Telepítve: %s)"
#: pkg/query/types.go:61 #: pkg/query/types.go:61
msgid "(Orphaned)" msgid "(Orphaned)"
msgstr "(Árva)" msgstr "(Elárvult)"
#: pkg/query/types.go:65 #: pkg/query/types.go:65
msgid "(Out-of-date: %s)" msgid "(Out-of-date: %s)"
@ -264,7 +264,7 @@ msgstr "Idegen telepített csomagok: %s"
#: pkg/vcs/vcs.go:144 #: pkg/vcs/vcs.go:144
msgid "Found git repo: %s" msgid "Found git repo: %s"
msgstr "Git tároló találat: %s" msgstr "Git-tároló találat: %s"
#: vcs.go:72 #: vcs.go:72
msgid "GenDB finished. No packages were installed" msgid "GenDB finished. No packages were installed"
@ -316,7 +316,7 @@ msgstr "Hiányzik"
#: pkg/query/aur_warnings.go:75 #: pkg/query/aur_warnings.go:75
msgid "Missing AUR Debug Packages:" msgid "Missing AUR Debug Packages:"
msgstr "Hiányzó AUR hibakereső csomagok:" msgstr "Hiányzó AUR-hibakereső-csomagok:"
#: print.go:31 #: print.go:31
msgid "Name" msgid "Name"
@ -324,7 +324,7 @@ msgstr "Név"
#: pkg/dep/dep_graph.go:442 pkg/dep/dep_graph.go:548 #: pkg/dep/dep_graph.go:442 pkg/dep/dep_graph.go:548
msgid "No AUR package found for" msgid "No AUR package found for"
msgstr "Nem található AUR csomag a következőhöz:" msgstr "Nem található AUR-csomag a következőhöz:"
#: pkg/dep/dep_graph.go:182 #: pkg/dep/dep_graph.go:182
msgid "No package found for" msgid "No package found for"
@ -340,7 +340,7 @@ msgstr "Nem kötelező függőségek"
#: pkg/query/aur_warnings.go:79 #: pkg/query/aur_warnings.go:79
msgid "Orphan (unmaintained) AUR Packages:" msgid "Orphan (unmaintained) AUR Packages:"
msgstr "Árva (nem karbantartott) AUR csomagok:" msgstr "Árva (nem karbantartott) AUR-csomagok:"
#: print.go:53 print.go:55 #: print.go:53 print.go:55
msgid "Out-of-date" msgid "Out-of-date"
@ -360,11 +360,11 @@ msgstr "PKGBUILD-ek szerkesztése?"
#: print.go:61 #: print.go:61
msgid "Package Base" msgid "Package Base"
msgstr "Csomag alap" msgstr "Csomag alapja"
#: print.go:60 #: print.go:60
msgid "Package Base ID" msgid "Package Base ID"
msgstr "Csomag alap ID-ja" msgstr "Csomag alapjának azonosítója"
#: pkg/query/aur_warnings.go:71 #: pkg/query/aur_warnings.go:71
msgid "Packages not in AUR:" msgid "Packages not in AUR:"
@ -381,11 +381,11 @@ msgstr "Kizárandó csomagok"
#: pkg/upgrade/service.go:294 #: pkg/upgrade/service.go:294
msgid "Packages to exclude: (eg: \"1 2 3\", \"1-3\", \"^4\" or repo name)" msgid "Packages to exclude: (eg: \"1 2 3\", \"1-3\", \"^4\" or repo name)"
msgstr "" msgstr ""
"Kihagyni kívánt csomagok: (pl.: „1 2 3”, „1-3”, „^4”, vagy tároló név)" "Kihagyni kívánt csomagok: (például: „1 2 3”, „1-3”, „^4”, vagy tároló név)"
#: cmd.go:392 #: cmd.go:392
msgid "Packages to install (eg: 1 2 3, 1-3 or ^4)" msgid "Packages to install (eg: 1 2 3, 1-3 or ^4)"
msgstr "Telepítendő csomagok (pl.: „1 2 3”, „1-3” vagy „^4”)" msgstr "Telepítendő csomagok (például: „1 2 3”, „1-3” vagy „^4”)"
#: print.go:49 #: print.go:49
msgid "Popularity" msgid "Popularity"
@ -413,7 +413,7 @@ msgstr "Tároló"
#: pkg/dep/dep_graph.go:730 #: pkg/dep/dep_graph.go:730
msgid "Repository AUR" msgid "Repository AUR"
msgstr "AUR tároló" msgstr "AUR-tároló"
#: pkg/dep/dep_graph.go:78 #: pkg/dep/dep_graph.go:78
msgid "SRCINFO" msgid "SRCINFO"
@ -433,15 +433,15 @@ msgstr "Csak a tároló csomagjainak megjelenítése"
#: print.go:95 #: print.go:95
msgid "Size of pacman cache %s: %s" msgid "Size of pacman cache %s: %s"
msgstr "A pacman gyorsítótár mérete %s: %s" msgstr "A pacman gyorsítótárának mérete %s: %s"
#: print.go:98 #: print.go:98
msgid "Size of yay cache %s: %s" msgid "Size of yay cache %s: %s"
msgstr "A yay gyorsítótár mérete %s: %s" msgstr "A yay gyorsítótárának mérete %s: %s"
#: print.go:62 #: print.go:62
msgid "Snapshot URL" msgid "Snapshot URL"
msgstr "Pillanatkép webcím" msgstr "Pillanatkép webcíme"
#: pkg/dep/dep_graph.go:76 #: pkg/dep/dep_graph.go:76
msgid "Sync" msgid "Sync"
@ -571,7 +571,7 @@ msgstr "hiba telepítés közben:"
#: pkg/sync/build/installer.go:233 pkg/sync/build/installer.go:237 #: pkg/sync/build/installer.go:233 pkg/sync/build/installer.go:237
msgid "error making: %s" msgid "error making: %s"
msgstr "make hiba: %s" msgstr "fordítási hiba: %s"
#: pkg/sync/workdir/merge.go:24 #: pkg/sync/workdir/merge.go:24
msgid "error merging %s: %s" msgid "error merging %s: %s"
@ -623,7 +623,7 @@ msgstr "sikerült olvasni a config fájlt „%s”: %s"
#: pkg/cmd/graph/main.go:46 pkg/runtime/runtime.go:73 #: pkg/cmd/graph/main.go:46 pkg/runtime/runtime.go:73
msgid "failed to retrieve aur Cache" msgid "failed to retrieve aur Cache"
msgstr "nem sikerült lekérni az AUR gyorsítótárat" msgstr "nem sikerült lekérni az AUR gyorsítótárát"
#: pkg/upgrade/sources.go:27 #: pkg/upgrade/sources.go:27
msgid "ignoring package devel upgrade (no AUR info found):" msgid "ignoring package devel upgrade (no AUR info found):"

135
po/ko.po
View File

@ -1,19 +1,35 @@
# #
# Translators: # Translators:
# J G, 2021 # J G, 2021
# JungHee Lee <daemul72@gmail.com>, 2023 # Junghee Lee <daemul72@gmail.com>, 2025
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Last-Translator: JungHee Lee <daemul72@gmail.com>, 2023\n" "Last-Translator: Junghee Lee <daemul72@gmail.com>, 2025\n"
"Language-Team: Korean (https://app.transifex.com/yay-1/teams/123732/ko/)\n" "Language-Team: Korean (https://app.transifex.com/yay-1/teams/123732/ko/)\n"
"Language: ko\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: ko\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: xgotext\n" "X-Generator: xgotext\n"
#: clean.go:83
msgid ""
"\n"
"Build directory:"
msgstr ""
"\n"
"빌드 디렉터리:"
#: pkg/db/ialpm/alpm.go:201 pkg/dep/dep_graph.go:740
msgid ""
"\n"
"Enter a number (default=1): "
msgstr ""
"\n"
"숫자를 입력하세요 (기본값=1): "
#: pkg/menus/menu.go:32 #: pkg/menus/menu.go:32
msgid " (Build Files Exist)" msgid " (Build Files Exist)"
msgstr " (빌드 파일 존재)" msgstr " (빌드 파일 존재)"
@ -50,11 +66,11 @@ msgstr "%s가 존재합니다."
msgid "%s is up to date -- skipping" msgid "%s is up to date -- skipping"
msgstr "%s 최신 버전임 -- 건너뛰는 중" msgstr "%s 최신 버전임 -- 건너뛰는 중"
#: pkg/upgrade/service.go:292 #: pkg/upgrade/service.go:291
msgid "%s to upgrade/install." msgid "%s to upgrade/install."
msgstr "업그레이드/설치하려면 %s 선택합니다." msgstr "업그레이드/설치하려면 %s 선택합니다."
#: pkg/upgrade/service.go:286 #: pkg/upgrade/service.go:285
msgid "%s will also be installed for this operation." msgid "%s will also be installed for this operation."
msgstr "이 작업을 위해 %s 또한 설치됩니다." msgstr "이 작업을 위해 %s 또한 설치됩니다."
@ -84,7 +100,8 @@ msgstr "%s: 로컬 (%s) 버전이 AUR (%s)보다 높음"
#: vote.go:51 #: vote.go:51
msgid "" msgid ""
"%s: please set AUR_USERNAME and AUR_PASSWORD environment variables for voting" "%s: please set AUR_USERNAME and AUR_PASSWORD environment variables for "
"voting"
msgstr "%s: 투표를 위해 AUR_USERNAME 및 AUR_PASSWORD 환경 변수를 설정하십시오" msgstr "%s: 투표를 위해 AUR_USERNAME 및 AUR_PASSWORD 환경 변수를 설정하십시오"
#: pkg/download/unified.go:192 #: pkg/download/unified.go:192
@ -96,19 +113,18 @@ msgid "(%d/%d) Downloaded PKGBUILD: %s"
msgstr "(%d/%d) PKGBUILD 다운로드됨: %s" msgstr "(%d/%d) PKGBUILD 다운로드됨: %s"
#: pkg/download/aur.go:82 #: pkg/download/aur.go:82
#, fuzzy
msgid "(%d/%d) Failed to download PKGBUILD: %s" msgid "(%d/%d) Failed to download PKGBUILD: %s"
msgstr "(%d/%d) PKGBUILD 다운로드: %s" msgstr "(%d/%d) PKGBUILD 다운로드에 실패함: %s"
#: pkg/sync/srcinfo/service.go:109 #: pkg/sync/srcinfo/service.go:109
msgid "(%d/%d) Parsing SRCINFO: %s" msgid "(%d/%d) Parsing SRCINFO: %s"
msgstr "(%d/%d) SRCINFO 분석하는 중: %s" msgstr "(%d/%d) SRCINFO 분석하는 중: %s"
#: pkg/query/types.go:72 pkg/query/types.go:103 #: pkg/query/types.go:103 pkg/query/types.go:72
msgid "(Installed)" msgid "(Installed)"
msgstr "(설치됨)" msgstr "(설치됨)"
#: pkg/query/types.go:70 pkg/query/types.go:101 #: pkg/query/types.go:101 pkg/query/types.go:70
msgid "(Installed: %s)" msgid "(Installed: %s)"
msgstr "(설치됨: %s)" msgstr "(설치됨: %s)"
@ -120,14 +136,14 @@ msgstr "(고립됨)"
msgid "(Out-of-date: %s)" msgid "(Out-of-date: %s)"
msgstr "(오래됨: %s)" msgstr "(오래됨: %s)"
#: print.go:44
msgid "AUR URL"
msgstr "AUR URL"
#: pkg/dep/dep_graph.go:75 #: pkg/dep/dep_graph.go:75
msgid "AUR" msgid "AUR"
msgstr "AUR" msgstr "AUR"
#: print.go:44
msgid "AUR URL"
msgstr "AUR URL"
#: pkg/menus/edit_menu.go:58 #: pkg/menus/edit_menu.go:58
msgid "Add %s or %s to your environment variables" msgid "Add %s or %s to your environment variables"
msgstr "%s 또는 %s를 환경 변수에 추가합니다" msgstr "%s 또는 %s를 환경 변수에 추가합니다"
@ -144,7 +160,7 @@ msgstr "종속성 확인"
msgid "Check Deps" msgid "Check Deps"
msgstr "종속성 확인" msgstr "종속성 확인"
#: pkg/upgrade/service.go:90 #: pkg/upgrade/service.go:89
msgid "Checking development packages..." msgid "Checking development packages..."
msgstr "개발 패키지 확인하는 중..." msgstr "개발 패키지 확인하는 중..."
@ -200,7 +216,7 @@ msgstr "다음으로 PKGBUILD를 편집하시겠습니까?"
msgid "Error during AUR search: %s\n" msgid "Error during AUR search: %s\n"
msgstr "AUR 검색 중 오류: %s\n" msgstr "AUR 검색 중 오류: %s\n"
#: pkg/upgrade/service.go:296 #: pkg/upgrade/service.go:295
msgid "Excluding packages may cause partial upgrades and break systems" msgid "Excluding packages may cause partial upgrades and break systems"
msgstr "패키지를 제외하면 부분 업그레이드 및 시스템 중단이 발생할 수 있습니다." msgstr "패키지를 제외하면 부분 업그레이드 및 시스템 중단이 발생할 수 있습니다."
@ -229,7 +245,7 @@ msgstr "다음 패키지를 설치하지 못했습니다. 수동 개입이 필
msgid "First Submitted" msgid "First Submitted"
msgstr "처음 제출됨" msgstr "처음 제출됨"
#: pkg/query/aur_warnings.go:79 #: pkg/query/aur_warnings.go:83
msgid "Flagged Out Of Date AUR Packages:" msgid "Flagged Out Of Date AUR Packages:"
msgstr "오래된 AUR 패키지로 플래그 지정됨:" msgstr "오래된 AUR 패키지로 플래그 지정됨:"
@ -285,14 +301,14 @@ msgstr "종속성 만들기"
msgid "Make Deps" msgid "Make Deps"
msgstr "종속성 만들기" msgstr "종속성 만들기"
#: pkg/query/aur_warnings.go:71
msgid "Missing AUR Debug Packages:"
msgstr "누락된 AUR 디버그 패키지:"
#: pkg/dep/dep_graph.go:79 #: pkg/dep/dep_graph.go:79
msgid "Missing" msgid "Missing"
msgstr "누락됨" msgstr "누락됨"
#: pkg/query/aur_warnings.go:75
msgid "Missing AUR Debug Packages:"
msgstr "누락된 AUR 디버그 패키지:"
#: print.go:31 #: print.go:31
msgid "Name" msgid "Name"
msgstr "이름" msgstr "이름"
@ -302,9 +318,8 @@ msgid "No AUR package found for"
msgstr "다음에 대한 AUR 패키지를 찾을 수 없음" msgstr "다음에 대한 AUR 패키지를 찾을 수 없음"
#: pkg/dep/dep_graph.go:182 #: pkg/dep/dep_graph.go:182
#, fuzzy
msgid "No package found for" msgid "No package found for"
msgstr "다음에 대한 AUR 패키지를 찾을 수 없음" msgstr "다음 패키지를 찾을 수 없음:"
#: print.go:225 #: print.go:225
msgid "None" msgid "None"
@ -314,7 +329,7 @@ msgstr "없음"
msgid "Optional Deps" msgid "Optional Deps"
msgstr "선택적 종속성" msgstr "선택적 종속성"
#: pkg/query/aur_warnings.go:75 #: pkg/query/aur_warnings.go:79
msgid "Orphan (unmaintained) AUR Packages:" msgid "Orphan (unmaintained) AUR Packages:"
msgstr "고립 (유지 관리되지 않는) AUR 패키지:" msgstr "고립 (유지 관리되지 않는) AUR 패키지:"
@ -334,15 +349,15 @@ msgstr "PKGBUILD 최신 버전임, 다운로드 건너뛰는 중: %s"
msgid "PKGBUILDs to edit?" msgid "PKGBUILDs to edit?"
msgstr "PKGBUILD를 편집하시겠습니까?" msgstr "PKGBUILD를 편집하시겠습니까?"
#: print.go:60
msgid "Package Base ID"
msgstr "패키지 베이스 ID"
#: print.go:61 #: print.go:61
msgid "Package Base" msgid "Package Base"
msgstr "패키지 베이스" msgstr "패키지 베이스"
#: pkg/query/aur_warnings.go:67 #: print.go:60
msgid "Package Base ID"
msgstr "패키지 베이스 ID"
#: pkg/query/aur_warnings.go:71
msgid "Packages not in AUR:" msgid "Packages not in AUR:"
msgstr "AUR에 없는 패키지:" msgstr "AUR에 없는 패키지:"
@ -354,7 +369,7 @@ msgstr "cleanBuild할 패키지는 무엇인가요?"
msgid "Packages to exclude" msgid "Packages to exclude"
msgstr "제외할 패키지" msgstr "제외할 패키지"
#: pkg/upgrade/service.go:295 #: pkg/upgrade/service.go:294
msgid "Packages to exclude: (eg: \"1 2 3\", \"1-3\", \"^4\" or repo name)" msgid "Packages to exclude: (eg: \"1 2 3\", \"1-3\", \"^4\" or repo name)"
msgstr "제외할 패키지: (예: \"1 2 3\", \"1-3\", \"^4\" 혹은 저장소 이름)" msgstr "제외할 패키지: (예: \"1 2 3\", \"1-3\", \"^4\" 혹은 저장소 이름)"
@ -380,25 +395,25 @@ msgstr "설치 후 make 종속성을 제거하시겠습니까?"
#: print.go:43 #: print.go:43
msgid "Replaces" msgid "Replaces"
msgstr "" msgstr "교체하기"
#: pkg/db/ialpm/alpm.go:191 print.go:30
msgid "Repository"
msgstr "저장소"
#: pkg/dep/dep_graph.go:730 #: pkg/dep/dep_graph.go:730
msgid "Repository AUR" msgid "Repository AUR"
msgstr "저장소 AUR" msgstr "저장소 AUR"
#: print.go:30 pkg/db/ialpm/alpm.go:191
msgid "Repository"
msgstr "저장소"
#: pkg/dep/dep_graph.go:78 #: pkg/dep/dep_graph.go:78
msgid "SRCINFO" msgid "SRCINFO"
msgstr "SRCINFO" msgstr "SRCINFO"
#: pkg/upgrade/service.go:72 #: pkg/upgrade/service.go:71
msgid "Searching AUR for updates..." msgid "Searching AUR for updates..."
msgstr "AUR에서 업데이트 검색하는 중..." msgstr "AUR에서 업데이트 검색하는 중..."
#: pkg/upgrade/service.go:160 #: pkg/upgrade/service.go:159
msgid "Searching databases for updates..." msgid "Searching databases for updates..."
msgstr "데이터베이스에서 업데이트 검색하는 중..." msgstr "데이터베이스에서 업데이트 검색하는 중..."
@ -432,7 +447,7 @@ msgstr "다음 패키지는 이 컴퓨터의 아키텍처와 호환되지 않음
#: pkg/db/ialpm/alpm.go:179 pkg/dep/dep_graph.go:726 #: pkg/db/ialpm/alpm.go:179 pkg/dep/dep_graph.go:726
msgid "There are %[1]d providers available for %[2]s:" msgid "There are %[1]d providers available for %[2]s:"
msgstr "%[2]s에 사용할 수 있는 %[1]d개 공급자가 있습니다:" msgstr "%[2]s에 대해 %[1]d개의 의존성 충족 패키지가 있습니다:"
#: pkg/settings/exe/cmd_builder.go:258 #: pkg/settings/exe/cmd_builder.go:258
msgid "There may be another Pacman instance running. Waiting..." msgid "There may be another Pacman instance running. Waiting..."
@ -486,29 +501,13 @@ msgstr "Yay 버전 v%s"
msgid "[N]one" msgid "[N]one"
msgstr "[N]안함" msgstr "[N]안함"
#: clean.go:83
msgid ""
"\n"
"Build directory:"
msgstr ""
"\n"
"빌드 디렉터리:"
#: pkg/db/ialpm/alpm.go:201 pkg/dep/dep_graph.go:740
msgid ""
"\n"
"Enter a number (default=1): "
msgstr ""
"\n"
"숫자를 입력하세요 (기본값=1): "
#: pkg/settings/errors.go:29 #: pkg/settings/errors.go:29
msgid "aborting due to user" msgid "aborting due to user"
msgstr "사용자로 인해 중단됨" msgstr "사용자에 의해 중단됨"
#: pkg/settings/parser/parser.go:608 #: pkg/settings/parser/parser.go:608
msgid "argument '-' specified without input on stdin" msgid "argument '-' specified without input on stdin"
msgstr "stdin에 대한 입력 없이 지정된 인자 '-'" msgstr "stdin에 대한 입력없이 독립변수 '-' 지정됨"
#: local_install.go:26 #: local_install.go:26
msgid "cannot find PKGBUILD and .SRCINFO in directory" msgid "cannot find PKGBUILD and .SRCINFO in directory"
@ -530,11 +529,11 @@ msgstr "필요한 패키지를 모두 찾을 수 없음"
msgid "could not find any package archives listed in %s" msgid "could not find any package archives listed in %s"
msgstr "%s에 나열된 패키지 아카이브를 찾을 수 없음" msgstr "%s에 나열된 패키지 아카이브를 찾을 수 없음"
#: pkg/sync/build/errors.go:50 pkg/upgrade/service.go:287 #: pkg/sync/build/errors.go:50 pkg/upgrade/service.go:286
msgid "dependency" msgid "dependency"
msgstr "종속성" msgstr "종속성"
#: pkg/vcs/vcs.go:96 pkg/vcs/vcs.go:100 #: pkg/vcs/vcs.go:100 pkg/vcs/vcs.go:96
msgid "devel check for package failed: '%s' encountered an error" msgid "devel check for package failed: '%s' encountered an error"
msgstr "패키지에 대한 devel 확인 실패함: '%s'에 하나의 오류가 발생했습니다" msgstr "패키지에 대한 devel 확인 실패함: '%s'에 하나의 오류가 발생했습니다"
@ -642,6 +641,10 @@ msgstr "잘못된 저장소"
msgid "invalid value: %d is not between %d and %d" msgid "invalid value: %d is not between %d and %d"
msgstr "잘못된 값: %d가 %d와 %d 사이에 있지 않음" msgstr "잘못된 값: %d가 %d와 %d 사이에 있지 않음"
#: pkg/text/input.go:48
msgid "no"
msgstr "아니요"
#: pkg/sync/srcinfo/pgp/keys.go:110 #: pkg/sync/srcinfo/pgp/keys.go:110
msgid "no keys to import" msgid "no keys to import"
msgstr "가져올 키 없음" msgstr "가져올 키 없음"
@ -654,10 +657,6 @@ msgstr "실행된 쿼리가 없습니다"
msgid "no target directories specified" msgid "no target directories specified"
msgstr "지정된 대상 디렉터리가 없습니다" msgstr "지정된 대상 디렉터리가 없습니다"
#: pkg/text/input.go:48
msgid "no"
msgstr "아니요"
#: pkg/sync/build/installer.go:242 #: pkg/sync/build/installer.go:242
msgid "nothing to install for %s" msgid "nothing to install for %s"
msgstr "%s 용으로 설치할 항목 없음" msgstr "%s 용으로 설치할 항목 없음"
@ -668,7 +667,12 @@ msgstr "한번에 한 작업만 쓸 수 있음"
#: pkg/cmd/graph/main.go:70 #: pkg/cmd/graph/main.go:70
msgid "only one target is allowed" msgid "only one target is allowed"
msgstr "" msgstr "하나의 대상만 허용됩니다"
#: pkg/upgrade/service.go:291
msgid "package"
msgid_plural "packages"
msgstr[0] "패키지"
#: print.go:187 #: print.go:187
msgid "package '%s' was not found" msgid "package '%s' was not found"
@ -682,11 +686,6 @@ msgstr "AUR에서 패키지를 찾을 수 없습니다"
msgid "package not found in repos" msgid "package not found in repos"
msgstr "저장소에서 패키지를 찾을 수 없습니다" msgstr "저장소에서 패키지를 찾을 수 없습니다"
#: pkg/upgrade/service.go:292
msgid "package"
msgid_plural "packages"
msgstr[0] "패키지"
#: pkg/sync/srcinfo/pgp/keys.go:100 #: pkg/sync/srcinfo/pgp/keys.go:100
msgid "problem importing keys" msgid "problem importing keys"
msgstr "키 가져오는 중 오류" msgstr "키 가져오는 중 오류"

View File

@ -9,11 +9,12 @@
# Alex Wang, 2023 # Alex Wang, 2023
# Xuekai Deng, 2024 # Xuekai Deng, 2024
# CloverGit, 2024 # CloverGit, 2024
# qsdwindows No <2687267056@qq.com>, 2025 # qsdwindows <2687267056@qq.com>, 2025
# Haowen Shi, 2025
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Last-Translator: qsdwindows No <2687267056@qq.com>, 2025\n" "Last-Translator: Haowen Shi, 2025\n"
"Language-Team: Chinese (China) (https://app.transifex.com/yay-1/teams/123732/zh_CN/)\n" "Language-Team: Chinese (China) (https://app.transifex.com/yay-1/teams/123732/zh_CN/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -76,7 +77,7 @@ msgstr "%s 是最新的 -- 跳过"
#: pkg/upgrade/service.go:291 #: pkg/upgrade/service.go:291
msgid "%s to upgrade/install." msgid "%s to upgrade/install."
msgstr "%s 个要进行升级/安装的包。" msgstr "%s 将被升级/安装。"
#: pkg/upgrade/service.go:285 #: pkg/upgrade/service.go:285
msgid "%s will also be installed for this operation." msgid "%s will also be installed for this operation."
@ -587,7 +588,7 @@ msgstr "重置 %s 时出错: %s"
#: pkg/sync/build/errors.go:53 #: pkg/sync/build/errors.go:53
msgid "error updating package install reason to %s" msgid "error updating package install reason to %s"
msgstr "更新软件包安装原因至 %s 时出错" msgstr "更新软件包时因 %s 出错"
#: pkg/sync/build/errors.go:48 #: pkg/sync/build/errors.go:48
msgid "explicit" msgid "explicit"