From cd4462761a3b67ebc7ae3bb51cff0c1b0345504a Mon Sep 17 00:00:00 2001 From: Mudskipper875 <89634034+Mudskipper875@users.noreply.github.com> Date: Wed, 7 Sep 2022 21:38:15 +0530 Subject: [PATCH 1/5] Fix environment variable name in man-page (#1806) --- doc/yay.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/yay.8 b/doc/yay.8 index 54772ad7..9360278c 100644 --- a/doc/yay.8 +++ b/doc/yay.8 @@ -140,7 +140,7 @@ Prints the PKGBUILD of the given packages to stdout. .TP Web related operations such as voting for AUR packages. -Requires setting AUR_USER and AUR_PASSWORD environment variables. +Requires setting AUR_USERNAME and AUR_PASSWORD environment variables. .TP .B \-u, \-\-unvote From 7f9ac3435f697a301afe0f5d2946378ad3c707d9 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 13:52:25 +0200 Subject: [PATCH 2/5] Translate '/po/en.po' in 'ca' (#1813) Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- po/ca.po | 623 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 623 insertions(+) create mode 100644 po/ca.po diff --git a/po/ca.po b/po/ca.po new file mode 100644 index 00000000..233d87de --- /dev/null +++ b/po/ca.po @@ -0,0 +1,623 @@ +# +# Translators: +# Davidmp , 2022 +# +msgid "" +msgstr "" +"Last-Translator: Davidmp , 2022\n" +"Language-Team: Catalan (https://www.transifex.com/yay-1/teams/123732/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: xgotext\n" + +#: pkg/menus/menu.go:32 +msgid " (Build Files Exist)" +msgstr "(Els fitxers de compilació ja existeixen)" + +#: pkg/menus/menu.go:28 +msgid " (Installed)" +msgstr "(Instal·lat)" + +#: pkg/dep/depCheck.go:312 +msgid " (Target" +msgstr " (Destinació" + +#: pkg/dep/depCheck.go:314 +msgid " (Wanted by: " +msgstr "(Volgut per:" + +#: cmd.go:427 +msgid " [Installed]" +msgstr "[Instal·lat]" + +#: cmd.go:386 install.go:158 install.go:192 +msgid " there is nothing to do" +msgstr "No hi ha res per fer." + +#: pkg/menus/menu.go:48 +msgid "%s [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)" +msgstr "%s [T]ot [Av]orta [I]nstal·lat [No] instal·lat o (1 2 3, 1-3, ^4)" + +#: install.go:729 +msgid "%s already made -- skipping build" +msgstr "%s ja fet: se n'omet la construcció." + +#: pkg/menus/edit_menu.go:57 +msgid "%s is not set" +msgstr "%s no està establert." + +#: pkg/settings/exe/cmd_builder.go:198 +msgid "%s is present." +msgstr "%s és present." + +#: install.go:715 +msgid "%s is up to date -- skipping" +msgstr "%s està al dia: s'omet." + +#: install.go:640 +msgid "%s not satisfied, flushing install queue" +msgstr "%s no satisfet, es buida la cua d'instal·lació." + +#: pkg/pgp/keys.go:128 +msgid "%s, required by: %s" +msgstr "%s, requerit per %s" + +#: pkg/menus/diff_menu.go:50 +msgid "%s: No changes -- skipping" +msgstr "%s: sense canvis, s'omet." + +#: pkg/query/filter.go:52 +msgid "%s: can't use target with option --aur -- skipping" +msgstr "%s: no es pot usar l'objectiu amb l'opció --aur, s'omet." + +#: pkg/query/filter.go:47 +msgid "%s: can't use target with option --repo -- skipping" +msgstr "%s: no es pot usar l'objectiu amb l'opció --repo, s'omet." + +#: pkg/upgrade/sources.go:82 +msgid "%s: ignoring package upgrade (%s => %s)" +msgstr "%s: s'ignora l'actualització del paquet (%s => %s)" + +#: upgrade.go:138 +msgid "%s: local (%s) is newer than AUR (%s)" +msgstr "%s: el paquet local (%s) és més nou que el de l'AUR (%s)" + +#: pkg/download/unified.go:187 +msgid "(%d/%d) Downloaded PKGBUILD from ABS: %s" +msgstr "(%d/%d) PKGBUILD baixat de l'ABS: %s" + +#: pkg/download/aur.go:83 pkg/download/unified.go:183 +msgid "(%d/%d) Downloaded PKGBUILD: %s" +msgstr "(%d/%d) PKGBUILD baixat: %s" + +#: install.go:517 +msgid "(%d/%d) Parsing SRCINFO: %s" +msgstr "(%d/%d) S'analitza SRCINFO: %s" + +#: pkg/query/types.go:145 pkg/query/types.go:199 +msgid "(Installed)" +msgstr "(Instal·lat)" + +#: pkg/query/types.go:143 pkg/query/types.go:197 +msgid "(Installed: %s)" +msgstr "(Instal·lat: %s)" + +#: pkg/query/types.go:134 +msgid "(Orphaned)" +msgstr "(Orfes)" + +#: pkg/query/types.go:138 +msgid "(Out-of-date: %s)" +msgstr "(Obsolet: %s)" + +#: print.go:28 +msgid "AUR URL" +msgstr "URL de l'AUR" + +#: pkg/menus/edit_menu.go:58 +msgid "Add %s or %s to your environment variables" +msgstr "Afegiu %s o %s a les variables d'entorn." + +#: main.go:103 +msgid "Avoid running yay as root/sudo." +msgstr "Eviteu executar yay com a root / sudo." + +#: print.go:34 +msgid "Check Deps" +msgstr "Comprova les dependències" + +#: upgrade.go:88 +msgid "Checking development packages..." +msgstr "Es comproven els paquets de desenvolupament..." + +#: pkg/dep/depCheck.go:137 +msgid "Checking for conflicts..." +msgstr "Es comprova si hi ha conflictes..." + +#: pkg/dep/depCheck.go:145 +msgid "Checking for inner conflicts..." +msgstr "Es comprova si hi ha conflictes interns..." + +#: clean.go:206 +msgid "Cleaning (%d/%d): %s" +msgstr "Es neteja (%d/%d): %s" + +#: pkg/dep/depCheck.go:200 +msgid "Conflicting packages will have to be confirmed manually" +msgstr "Els paquets conflictius s'hauran de confirmar manualment." + +#: print.go:36 +msgid "Conflicts With" +msgstr "Té conflicte amb" + +#: pkg/dep/depCheck.go:305 +msgid "Could not find all required packages:" +msgstr "No s'han pogut trobar tots els paquets necessaris:" + +#: pkg/menus/clean_menu.go:52 +msgid "Deleting (%d/%d): %s" +msgstr "Se suprimeix (%d/%d): %s" + +#: print.go:32 +msgid "Depends On" +msgstr "Depèn de" + +#: print.go:26 +msgid "Description" +msgstr "Descripció" + +#: pkg/menus/diff_menu.go:157 +msgid "Diffs to show?" +msgstr "Diferències per mostrar?" + +#: clean.go:72 +msgid "Do you want to remove ALL AUR packages from cache?" +msgstr "Voleu suprimir TOTS els paquets de l'AUR de la memòria cau?" + +#: clean.go:89 +msgid "Do you want to remove ALL untracked AUR files?" +msgstr "Voleu suprimir TOTS els fitxers de l'AUR sense seguiment?" + +#: clean.go:74 +msgid "Do you want to remove all other AUR packages from cache?" +msgstr "Voleu suprimir tots els altres paquets de l'AUR de la memòria cau?" + +#: pkg/menus/edit_menu.go:61 +msgid "Edit PKGBUILD with?" +msgstr "Amb què voleu editar el PKGBUILD?" + +#: pkg/query/errors.go:13 +msgid "Error during AUR search: %s\n" +msgstr "Error durant la cerca a l'AUR: %s\n" + +#: print.go:85 +msgid "Explicitly installed packages: %s" +msgstr "Paquets instal·lats explícitament: %s" + +#: print.go:40 +msgid "First Submitted" +msgstr "Enviat primer" + +#: pkg/query/aur_warnings.go:43 +msgid "Flagged Out Of Date AUR Packages:" +msgstr "Paquets de l'AUR obsolets marcats:" + +#: print.go:84 +msgid "Foreign installed packages: %s" +msgstr "Paquets forans instal·lats: %s" + +#: pkg/vcs/vcs.go:119 +msgid "Found git repo: %s" +msgstr "S'ha trobat el repositori git: %s" + +#: vcs.go:73 +msgid "GenDB finished. No packages were installed" +msgstr "GenDB ha acabat. No s'ha instal·lat cap paquet." + +#: print.go:29 +msgid "Groups" +msgstr "Grups" + +#: pkg/pgp/keys.go:88 +msgid "Import?" +msgstr "Ho importo?" + +#: pkg/pgp/keys.go:101 +msgid "Importing keys with gpg..." +msgstr "S'importen claus amb gpg..." + +#: pkg/dep/depCheck.go:155 +msgid "Inner conflicts found:" +msgstr "Conflictes interns trobats:" + +#: pkg/dep/depCheck.go:173 +msgid "Installing %s will remove:" +msgstr "La instal·lació de %s suprimirà el següent:" + +#: print.go:24 +msgid "Keywords" +msgstr "Paraules clau" + +#: print.go:41 +msgid "Last Modified" +msgstr "Darrera modificació" + +#: print.go:30 +msgid "Licenses" +msgstr "Llicències" + +#: print.go:37 +msgid "Maintainer" +msgstr "Mantenidor" + +#: print.go:33 +msgid "Make Deps" +msgstr "Dependències de construcció" + +#: pkg/query/aur_warnings.go:33 +msgid "Missing AUR Debug Packages:" +msgstr "Manquen paquets de depuració de l'AUR:" + +#: pkg/query/aur_warnings.go:28 +msgid "Missing AUR Packages:" +msgstr "Manquen paquets de l'AUR:" + +#: print.go:23 +msgid "Name" +msgstr "Nom" + +#: pkg/text/print.go:95 +msgid "None" +msgstr "Cap" + +#: print.go:35 +msgid "Optional Deps" +msgstr "Dependències opcionals" + +#: pkg/query/aur_warnings.go:38 +msgid "Orphaned AUR Packages:" +msgstr "Paquets de l'AUR orfes:" + +#: print.go:44 print.go:46 +msgid "Out-of-date" +msgstr "Obsolet" + +#: pkg/pgp/keys.go:119 +msgid "PGP keys need importing:" +msgstr "Cal importar claus PGP:" + +#: install.go:242 vcs.go:50 +msgid "PKGBUILD up to date, Skipping (%d/%d): %s" +msgstr "PKGBUILD actualitzat, s'omet (%d/%d): %s" + +#: pkg/menus/edit_menu.go:123 +msgid "PKGBUILDs to edit?" +msgstr "PKGBUILDs per editar?" + +#: print.go:51 +msgid "Package Base ID" +msgstr "ID de la base de paquets" + +#: print.go:52 +msgid "Package Base" +msgstr "Base de paquets" + +#: pkg/dep/depCheck.go:170 +msgid "Package conflicts found:" +msgstr "Conflictes de paquets trobats:" + +#: pkg/menus/clean_menu.go:44 +msgid "Packages to cleanBuild?" +msgstr "Paquets per a la neteja de la construcció?" + +#: upgrade.go:186 +msgid "Packages to exclude: (eg: \"1 2 3\", \"1-3\", \"^4\" or repo name)" +msgstr "Paquets per excloure: (p. ex.: \"1 2 3\", \"1-3\", \"^4\" o nom del repositori)" + +#: cmd.go:368 +msgid "Packages to install (eg: 1 2 3, 1-3 or ^4)" +msgstr "Paquets per instal·lar (p. ex.: 1 2 3, 1-3 o ^4)" + +#: upgrade.go:183 +msgid "Packages to upgrade." +msgstr "Paquets per actualitzar" + +#: print.go:39 +msgid "Popularity" +msgstr "Popularitat" + +#: pkg/menus/diff_menu.go:169 pkg/menus/edit_menu.go:134 +msgid "Proceed with install?" +msgstr "Voleu continuar la instal·lació?" + +#: print.go:31 +msgid "Provides" +msgstr "Proporciona" + +#: pkg/query/aur_info.go:88 +msgid "Querying AUR..." +msgstr "Es consulta l'AUR..." + +#: install.go:213 +msgid "Remove make dependencies after install?" +msgstr "" +"Suprimeixo les dependències de construcció després de la instal·lació?" + +#: pkg/dep/depPool.go:546 +msgid "Repository AUR" +msgstr "Repositori de l'AUR" + +#: print.go:22 pkg/db/ialpm/alpm.go:175 +msgid "Repository" +msgstr "Repositori" + +#: upgrade.go:68 +msgid "Searching AUR for updates..." +msgstr "Se cerquen actualitzacions a l'AUR..." + +#: upgrade.go:57 +msgid "Searching databases for updates..." +msgstr "Se cerquen actualitzacions a les bases de dades..." + +#: pkg/query/mixed_sources.go:200 pkg/query/source.go:79 +msgid "Showing repo packages only" +msgstr "Es mostren només paquets dels repositoris." + +#: print.go:89 +msgid "Size of pacman cache %s: %s" +msgstr "Mida de la memòria cau del pacman %s: %s" + +#: print.go:92 +msgid "Size of yay cache %s: %s" +msgstr "Mida de la memòria cau del yay %s: %s" + +#: print.go:53 +msgid "Snapshot URL" +msgstr "URL de la instantània" + +#: print.go:94 +msgid "Ten biggest packages:" +msgstr "Els deu paquets més grossos:" + +#: install.go:461 +msgid "The following packages are not compatible with your architecture:" +msgstr "Els paquets següents no són compatibles amb la vostra arquitectura:" + +#: pkg/db/ialpm/alpm.go:163 pkg/dep/depPool.go:541 +msgid "There are %d providers available for %s:" +msgstr "Hi ha %d proveïdors disponibles per a %s:" + +#: pkg/settings/exe/cmd_builder.go:199 +msgid "There may be another Pacman instance running. Waiting..." +msgstr "" +"Pot ser que hi hagi una altra instància del Pacman en execució. S'espera..." + +#: print.go:86 +msgid "Total Size occupied by packages: %s" +msgstr "Mida total ocupada pels paquets: %s" + +#: print.go:83 +msgid "Total installed packages: %s" +msgstr "Total de paquets instal·lats: %s" + +#: install.go:469 +msgid "Try to build them anyway?" +msgstr "Intento construir-los tanmateix?" + +#: print.go:27 +msgid "URL" +msgstr "URL" + +#: clean.go:182 +msgid "Unable to clean:" +msgstr "No es pot netejar:" + +#: get.go:42 get.go:73 +msgid "Unable to find the following packages:" +msgstr "No s'han pogut trobar els paquets següents:" + +#: print.go:25 +msgid "Version" +msgstr "Versió" + +#: print.go:38 +msgid "Votes" +msgstr "Vots" + +#: print.go:81 +msgid "Yay version v%s" +msgstr "Versió del yay: v%s" + +#: pkg/menus/menu.go:48 +msgid "[N]one" +msgstr "Ca[p]" + +#: clean.go:77 +msgid "" +"\n" +"Build directory:" +msgstr "" +"\n" +"Directori de construcció:" + +#: pkg/db/ialpm/alpm.go:185 pkg/dep/depPool.go:556 +msgid "" +"\n" +"Enter a number (default=1): " +msgstr "" +"\n" +"Introduïu un número (per defecte = 1):" + +#: pkg/settings/errors.go:29 +msgid "aborting due to user" +msgstr "s'avorta a causa de l'usuari" + +#: install.go:496 +msgid "cannot find package name: %v" +msgstr "no es pot trobar el nom del paquet: %v" + +#: install.go:688 install.go:821 +msgid "could not find PKGDEST for: %s" +msgstr "no s'ha pogut trobar PKGDEST per a %s" + +#: pkg/vcs/vcs.go:69 +msgid "devel check for package failed: '%s' encountered an error" +msgstr "la comprovació del paquet ha fallat: %s ha trobat un error" + +#: pkg/menus/edit_menu.go:108 +msgid "editor did not exit successfully, aborting: %s" +msgstr "l'editor no ha sortit correctament, s'avorta: %s" + +#: aur_source.go:26 +msgid "error downloading sources: %s" +msgstr "error en baixar les fonts: %s" + +#: pkg/download/errors.go:25 +msgid "error fetching %s: %s" +msgstr "error en obtenir %s: %s" + +#: install.go:299 install.go:405 +msgid "error installing repo packages" +msgstr "error en instal·lar paquets dels repositoris" + +#: install.go:671 install.go:712 install.go:726 install.go:740 +msgid "error making: %s" +msgstr "error de construcció: %s" + +#: install.go:573 +msgid "error merging %s: %s" +msgstr "error en combinar %s: %s" + +#: pkg/download/unified.go:56 +msgid "error reading %s" +msgstr "error en llegir %s" + +#: install.go:88 +msgid "error refreshing databases" +msgstr "error en actualitzar les bases de dades" + +#: clean.go:212 install.go:566 +msgid "error resetting %s: %s" +msgstr "error en restablir %s: %s" + +#: install.go:42 +msgid "error updating package install reason to dependency" +msgstr "" +"error en actualitzar el motiu d'instal·lació del paquet a la dependència" + +#: install.go:60 +msgid "error updating package install reason to explicit" +msgstr "error en actualitzar el motiu d'instal·lació del paquet a explícit" + +#: pkg/settings/errors.go:23 +msgid "failed to create directory '%s': %s" +msgstr "no s'ha pogut crear el directori %s: %s" + +#: pkg/settings/config.go:293 +msgid "failed to open config file '%s': %s" +msgstr "no s'ha pogut obrir el fitxer de configuració %s: %s" + +#: install.go:522 +msgid "failed to parse %s -- skipping: %s" +msgstr "ha fallat analitzar %s, s'omet: %s" + +#: install.go:526 +msgid "failed to parse %s: %s" +msgstr "no s'ha pogut analitzar %s: %s" + +#: pkg/settings/config.go:303 +msgid "failed to read config file '%s': %s" +msgstr "no s'ha pogut llegir el fitxer de configuració %s: %s" + +#: pkg/text/errors.go:8 +msgid "input too long" +msgstr "entrada massa llarga" + +#: pkg/db/ialpm/alpm.go:206 pkg/dep/depPool.go:576 +msgid "invalid number: %s" +msgstr "número no vàlid: %s" + +#: pkg/settings/parser/parser.go:174 +msgid "invalid option '%s'" +msgstr "opció no vàlida: %s" + +#: cmd.go:202 +msgid "invalid option: '--deps' and '--explicit' may not be used together" +msgstr "opció no vàlida: \"--deps\" i \"--explicit\" no es poden usar juntes" + +#: pkg/download/abs.go:21 +msgid "invalid repository" +msgstr "repositori no vàlid" + +#: pkg/db/ialpm/alpm.go:211 pkg/dep/depPool.go:581 +msgid "invalid value: %d is not between %d and %d" +msgstr "valor no vàlid: %d no és entre %d i %d" + +#: pkg/pgp/keys.go:114 +msgid "no keys to import" +msgstr "sense claus per importar" + +#: pkg/query/errors.go:20 +msgid "no query was executed" +msgstr "no s'ha executat cap consulta" + +#: pkg/text/text.go:60 +msgid "no" +msgstr "no" + +#: pkg/settings/parser/parser.go:164 +msgid "only one operation may be used at a time" +msgstr "només es pot usar una operació alhora" + +#: print.go:185 +msgid "package '%s' was not found" +msgstr "no s'ha trobat el paquet %s" + +#: pkg/dep/depCheck.go:197 +msgid "package conflicts can not be resolved with noconfirm, aborting" +msgstr "" +"els conflictes de paquets no es poden resoldre amb noconfirm, s'avorta" + +#: pkg/download/errors.go:15 +msgid "package not found in AUR" +msgstr "paquet no trobat a l'AUR" + +#: pkg/download/abs.go:22 +msgid "package not found in repos" +msgstr "paquet no trobat als repositoris" + +#: pkg/pgp/keys.go:104 +msgid "problem importing keys" +msgstr "problema d'importació de claus" + +#: clean.go:97 +msgid "removing AUR packages from cache..." +msgstr "se suprimeixen paquets de l'AUR de la memòria cau..." + +#: clean.go:167 clean.go:198 +msgid "removing untracked AUR files from cache..." +msgstr "" +"se suprimeixen els fitxers de l'AUR sense seguiment de la memòria cau..." + +#: install.go:830 +msgid "the PKGDEST for %s is listed by makepkg but does not exist: %s" +msgstr "el PKGDEST per a %s està llistat per makepkg però no existeix:%s" + +#: pkg/db/ialpm/alpm.go:231 +msgid "unable to CreateHandle: %s" +msgstr "no se'n pot crear el maneig: %s" + +#: cmd.go:191 +msgid "unhandled operation" +msgstr "operació no gestionada" + +#: cmd.go:424 +msgid "unknown-version" +msgstr "versió desconeguda" + +#: pkg/text/text.go:59 +msgid "yes" +msgstr "sí" From 647d160182ab4487158df0e3568ed282095af885 Mon Sep 17 00:00:00 2001 From: moson-mo <13588013+moson-mo@users.noreply.github.com> Date: Sun, 18 Sep 2022 02:05:27 +0200 Subject: [PATCH 3/5] add option/setting "AurRpcUrl" (#1809) Signed-off-by: moson-mo --- cmd.go | 1 + completions/bash | 2 +- completions/fish | 1 + completions/zsh | 1 + doc/yay.8 | 4 ++++ pkg/settings/args.go | 17 ++++++++++++++++- pkg/settings/config.go | 2 ++ pkg/settings/parser/parser.go | 2 ++ 8 files changed, 28 insertions(+), 2 deletions(-) diff --git a/cmd.go b/cmd.go index fe95d55e..88626c2e 100644 --- a/cmd.go +++ b/cmd.go @@ -59,6 +59,7 @@ Permanent configuration options: config file when used --aururl Set an alternative AUR URL + --aurrpcurl Set an alternative URL for the AUR /rpc endpoint --builddir Directory used to download and run PKGBUILDS --editor Editor to use when editing PKGBUILDs --editorflags Pass arguments to editor diff --git a/completions/bash b/completions/bash index c28cbd25..be41c706 100644 --- a/completions/bash +++ b/completions/bash @@ -75,7 +75,7 @@ _yay() { noansweredit noanswerupgrade cleanmenu diffmenu editmenu upgrademenu cleanafter nocleanafter nocleanmenu nodiffmenu noupgrademenu provides noprovides pgpfetch nopgpfetch useask nouseask combinedupgrade nocombinedupgrade aur repo makepkgconf - nomakepkgconf askremovemake removemake noremovemake completioninterval aururl + nomakepkgconf askremovemake removemake noremovemake completioninterval aururl aurrpcurl searchby batchinstall nobatchinstall' 'b d h q r v') yays=('clean gendb' 'c') diff --git a/completions/fish b/completions/fish index 1ff1ed5b..f4cd23c4 100644 --- a/completions/fish +++ b/completions/fish @@ -189,6 +189,7 @@ complete -c $progname -n "$getpkgbuild" -s p -l print -d 'Print pkgbuild of pack # Permanent configuration settings complete -c $progname -n "not $noopt" -l save -d 'Save current arguments to yay permanent configuration' -f complete -c $progname -n "not $noopt" -l aururl -d 'Set an alternative AUR URL' -f +complete -c $progname -n "not $noopt" -l aurrpcurl -d 'Set an alternative URL for the AUR /rpc endpoint' -f complete -c $progname -n "not $noopt" -l builddir -d 'Directory to use for Building AUR Packages' -r complete -c $progname -n "not $noopt" -l editor -d 'Editor to use' -f complete -c $progname -n "not $noopt" -l editorflags -d 'Editor flags to use' -f diff --git a/completions/zsh b/completions/zsh index b81cfee0..38b4292d 100644 --- a/completions/zsh +++ b/completions/zsh @@ -26,6 +26,7 @@ _pacman_opts_common=( '--repo[Assume targets are from the repositories]' {-a,--aur}'[Assume targets are from the AUR]' '--aururl[Set an alternative AUR URL]:url' + '--aurrpcurl[Set an alternative URL for the AUR /rpc endpoint]:url' '--arch[Set an alternate architecture]' {-b,--dbpath}'[Alternate database location]:database_location:_files -/' '--color[colorize the output]:color options:(always never auto)' diff --git a/doc/yay.8 b/doc/yay.8 index 9360278c..27276cb1 100644 --- a/doc/yay.8 +++ b/doc/yay.8 @@ -161,6 +161,10 @@ file. .B \-\-aururl Set an alternative AUR URL. +.TP +.B \-\-aurrpcurl +Set an alternative URL for the AUR /rpc endpoint. + .TP .B \-\-builddir Directory to use for Building AUR Packages. This directory is also used as diff --git a/pkg/settings/args.go b/pkg/settings/args.go index db276f63..2effc2d2 100644 --- a/pkg/settings/args.go +++ b/pkg/settings/args.go @@ -27,14 +27,29 @@ func (c *Configuration) extractYayOptions(a *parser.Arguments) { } } - c.Runtime.AURClient.BaseURL = strings.TrimRight(c.AURURL, "/") + "/rpc?" c.AURURL = strings.TrimRight(c.AURURL, "/") + c.Runtime.AURClient.BaseURL = c.AURURL + "/rpc?" + + // if AurRPCURL is set, use that for /rpc calls + if c.AURRPCURL != "" { + if !strings.HasSuffix(c.AURRPCURL, "?") { + if strings.HasSuffix(c.AURRPCURL, "/rpc") { + c.AURRPCURL += "?" + } else { + c.AURRPCURL = strings.TrimRight(c.AURRPCURL, "/") + "/rpc?" + } + } + + c.Runtime.AURClient.BaseURL = c.AURRPCURL + } } func (c *Configuration) handleOption(option, value string) bool { switch option { case "aururl": c.AURURL = value + case "aurrpcurl": + c.AURRPCURL = value case "save": c.Runtime.SaveConfig = true case "afterclean", "cleanafter": diff --git a/pkg/settings/config.go b/pkg/settings/config.go index bf39cabc..200cd70c 100644 --- a/pkg/settings/config.go +++ b/pkg/settings/config.go @@ -31,6 +31,7 @@ var NoConfirm = false // Configuration stores yay's config. type Configuration struct { AURURL string `json:"aururl"` + AURRPCURL string `json:"aurrpcurl"` BuildDir string `json:"buildDir"` Editor string `json:"editor"` EditorFlags string `json:"editorflags"` @@ -110,6 +111,7 @@ func (c *Configuration) Save(configPath string) error { func (c *Configuration) expandEnv() { c.AURURL = os.ExpandEnv(c.AURURL) + c.AURRPCURL = os.ExpandEnv(c.AURRPCURL) c.BuildDir = os.ExpandEnv(c.BuildDir) c.Editor = os.ExpandEnv(c.Editor) c.EditorFlags = os.ExpandEnv(c.EditorFlags) diff --git a/pkg/settings/parser/parser.go b/pkg/settings/parser/parser.go index 3e264ad1..5329a101 100644 --- a/pkg/settings/parser/parser.go +++ b/pkg/settings/parser/parser.go @@ -373,6 +373,7 @@ func isArg(arg string) bool { case "machinereadable": // yay options case "aururl": + case "aurrpcurl": case "save": case "afterclean", "cleanafter": case "noafterclean", "nocleanafter": @@ -520,6 +521,7 @@ func hasParam(arg string) bool { case "color": // yay params case "aururl": + case "aurrpcurl": case "mflags": case "gpgflags": case "gitflags": From 1f49b7e11cd08caa507345ade16403018d2611b6 Mon Sep 17 00:00:00 2001 From: Norbert Pfeiler Date: Tue, 11 Oct 2022 08:39:08 +0200 Subject: [PATCH 4/5] align test numbers, also color expected output (#1815) --- pkg/upgrade/upgrade_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/upgrade/upgrade_test.go b/pkg/upgrade/upgrade_test.go index 4e915081..15e83697 100644 --- a/pkg/upgrade/upgrade_test.go +++ b/pkg/upgrade/upgrade_test.go @@ -61,8 +61,8 @@ func TestGetVersionDiff(t *testing.T) { o, n := GetVersionDiff(pair.Old, pair.New) if o != out[i].Old || n != out[i].New { - t.Errorf("Test %d failed for update: expected (%s => %s) got (%s => %s) %d %d %d %d", - i+1, in[i].Old, in[i].New, o, n, len(in[i].Old), len(in[i].New), len(o), len(n)) + t.Errorf("Test %-2d failed for update: expected (%s => %s) got (%s => %s) %d %d %d %d", + i+1, out[i].Old, out[i].New, o, n, len(out[i].Old), len(out[i].New), len(o), len(n)) } } } From a88fad68d488f6879e461a86bf33b3818ea9575a Mon Sep 17 00:00:00 2001 From: Jo Date: Fri, 28 Oct 2022 20:57:23 +0000 Subject: [PATCH 5/5] fix: fix wrong env var in readme for aur voting (#1823) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 24fc2153..f354fa2b 100644 --- a/README.md +++ b/README.md @@ -100,8 +100,8 @@ pacman -S --needed git base-devel yay | `yay -Y --gendb` | Generate development package database used for devel update. | | `yay -Syu --devel` | Perform system upgrade, but also check for development package updates. | | `yay -Syu --timeupdate` | Perform system upgrade and use PKGBUILD modification time (not version number) to determine update. | -| `yay -Wv ` | Vote for package (Requires setting `AUR_USER` and `AUR_PASSWORD` environment variables). (yay v11.3+) | -| `yay -Wu ` | Unvote for package (Requires setting `AUR_USER` and `AUR_PASSWORD` environment variables) (yay v11.3+)| +| `yay -Wv ` | Vote for package (Requires setting `AUR_USERNAME` and `AUR_PASSWORD` environment variables). (yay v11.3+) | +| `yay -Wu ` | Unvote for package (Requires setting `AUR_USERNAME` and `AUR_PASSWORD` environment variables) (yay v11.3+)| ## Frequently Asked Questions