Compare commits

..

No commits in common. "next" and "v12.5.0" have entirely different histories.

33 changed files with 281 additions and 543 deletions

View File

@ -1,26 +0,0 @@
# 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

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

View File

@ -1,15 +0,0 @@
# 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,13 +16,12 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
env:
GOFLAGS: -buildvcs=false -tags=next
run: /app/bin/golangci-lint run -v ./...
# - name: Lint
# env:
# GOFLAGS: -buildvcs=false -tags=next
# run: /app/bin/golangci-lint run -v ./...
- name: Run Build and Tests
run: make test
- name: Run Integration Tests
continue-on-error: true
run: |
@ -30,15 +29,4 @@ jobs:
chown -R yay:yay . &&
cp -r ~/go/ /home/yay/go/ &&
chown -R yay:yay /home/yay/go/ &&
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
su yay -c "make test-integration"

View File

@ -1,18 +1,67 @@
version: "2"
run:
go: "1.20"
linters-settings:
dupl:
threshold: 100
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:
default: none
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- forbidigo
- bodyclose
- dogsled
- dupl
- errcheck
- errorlint
- errcheck
# - funlen # TOFIX
- gochecknoinits
# - goconst # TOFIX
- gocritic
# - gocyclo # TOFIX
- gofmt
- goimports
# - gomnd # TOFIX
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
@ -21,74 +70,36 @@ linters:
- noctx
- nolintlint
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
settings:
dupl:
threshold: 100
funlen:
lines: 100
statements: 50
goconst:
min-len: 3
min-occurrences: 4
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
gocyclo:
min-complexity: 15
lll:
line-length: 140
misspell:
locale: US
nolintlint:
require-explanation: false
require-specific: false
allow-unused: false
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$
run:
go: "1.20"
timeout: "10m"
forbidigo:
forbid:
- p: ^fmt\.Print.*$
msg: Do not commit print statements.
issues:
exclude-rules:
- path: (.+)_test.go
linters:
- lll
- revive
- wsl
- govet
- godot
- errcheck
- stylecheck
- dupl
- gocritic
- gochecknoinits
- errorlint
exclude:
- G204

View File

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

View File

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

View File

@ -1,13 +0,0 @@
# 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 && \
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/* && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v2.1.5 && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.64.6 && \
go mod download

View File

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

12
go.mod
View File

@ -8,13 +8,13 @@ require (
github.com/Morganamilo/go-srcinfo v1.0.0
github.com/adrg/strutil v0.3.1
github.com/bradleyjkemp/cupaloy v2.3.0+incompatible
github.com/deckarep/golang-set/v2 v2.8.0
github.com/deckarep/golang-set/v2 v2.7.0
github.com/hashicorp/go-multierror v1.1.1
github.com/leonelquinteros/gotext v1.7.2
github.com/stretchr/testify v1.10.0
golang.org/x/net v0.41.0
golang.org/x/sys v0.33.0
golang.org/x/term v0.32.0
github.com/leonelquinteros/gotext v1.7.1
github.com/stretchr/testify v1.9.0
golang.org/x/net v0.38.0
golang.org/x/sys v0.31.0
golang.org/x/term v0.30.0
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.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deckarep/golang-set/v2 v2.8.0 h1:swm0rlPCmdWn9mESxKOjWk8hXSqoxOp+ZlfuyaAdFlQ=
github.com/deckarep/golang-set/v2 v2.8.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
github.com/deckarep/golang-set/v2 v2.7.0 h1:gIloKvD7yH2oip4VLhsv3JyLLFnC0Y2mlusgcvJYW5k=
github.com/deckarep/golang-set/v2 v2.7.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/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
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/timefmt-go v0.1.6 h1:ia3s54iciXDdzWzwaVKXZPbiXzxxnv1SPGFfM/myJ5Q=
github.com/itchyny/timefmt-go v0.1.6/go.mod h1:RRDZYC5s9ErkjQvTvvU7keJjxUYzIISJGxm9/mAERQg=
github.com/leonelquinteros/gotext v1.7.2 h1:bDPndU8nt+/kRo1m4l/1OXiiy2v7Z7dfPQ9+YP7G1Mc=
github.com/leonelquinteros/gotext v1.7.2/go.mod h1:9/haCkm5P7Jay1sxKDGJ5WIg4zkz8oZKw4ekNpALob8=
github.com/leonelquinteros/gotext v1.7.1 h1:/JNPeE3lY5JeVYv2+KBpz39994W3W9fmZCGq3eO9Ri8=
github.com/leonelquinteros/gotext v1.7.1/go.mod h1:I0WoFDn9u2D3VbPnnDPT8mzZu0iSXG8iih+AH2fHHqg=
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/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.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.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y=
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
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/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)
}
if srcinfo == "" {
if len(srcinfo) == 0 {
return fmt.Errorf("generated .SRCINFO is empty, check your PKGBUILD for errors")
}

View File

@ -6,7 +6,6 @@ import (
"os"
"os/exec"
"runtime/debug"
"strings"
"github.com/leonelquinteros/gotext"
@ -28,12 +27,7 @@ func initGotext() {
}
if lc := os.Getenv("LANGUAGE"); lc != "" {
// 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")
}
gotext.Configure(localePath, lc, "yay")
} else if lc := os.Getenv("LC_ALL"); lc != "" {
gotext.Configure(localePath, lc, "yay")
} else if lc := os.Getenv("LC_MESSAGES"); lc != "" {

View File

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

View File

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

View File

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

View File

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

View File

@ -37,7 +37,7 @@ func GetVersionDiff(oldVersion, newVersion string) (left, right string) {
}
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 charIsSpecial {

View File

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

View File

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

View File

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

View File

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

View File

@ -612,18 +612,8 @@ func TestInstaller_CompileFailed(t *testing.T) {
failed, err := installer.CompileFailedAndIgnored()
if tc.wantErrCompile {
require.Error(td, err)
for key := range failed {
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))
assert.ErrorContains(td, err, "yay")
assert.Len(t, failed, len(tc.targets))
} else {
require.NoError(td, err)
}

View File

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

View File

@ -1,167 +0,0 @@
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,15 +194,14 @@ func (preper *Preparer) PrepareWorkspace(ctx context.Context,
for _, layer := range targets {
for _, info := range layer {
switch info.Source {
case dep.AUR:
if info.Source == dep.AUR {
pkgBase := *info.AURBase
pkgBuildDir := filepath.Join(preper.cfg.BuildDir, pkgBase)
if preper.needToCloneAURBase(info, pkgBuildDir) {
aurBasesToClone.Add(pkgBase)
}
pkgBuildDirsByBase[pkgBase] = pkgBuildDir
case dep.SrcInfo:
} else if info.Source == dep.SrcInfo {
pkgBase := *info.AURBase
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.
func LessRunes(iRunes, jRunes []rune) bool {
maxLen := len(iRunes)
if maxLen > len(jRunes) {
maxLen = len(jRunes)
max := len(iRunes)
if max > len(jRunes) {
max = len(jRunes)
}
for idx := 0; idx < maxLen; idx++ {
for idx := 0; idx < max; idx++ {
ir := iRunes[idx]
jr := jRunes[idx]

View File

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

View File

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

View File

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

139
po/ko.po
View File

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

View File

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