Commit Graph

313 Commits

Author SHA1 Message Date
jguer
742b6ad79c
use aur cache for upgrades 2022-11-08 01:32:21 +01:00
jguer
3fc5d93243
add graph feeding 2022-11-02 00:37:27 +01:00
jguer
b5bdcfbd1a
add basic sync upgrade capabilities 2022-11-01 23:48:35 +01:00
jguer
776fc9686a
Merge remote-tracking branch 'origin/next' into jguer/local-pkgbuild-install 2022-10-28 23:58:23 +02:00
jguer
d3efb59da3
extract upgrade target adder 2022-10-28 23:58:15 +02:00
jguer
ba935ccf95
add support for target install 2022-10-28 00:38:11 +02:00
Norbert Pfeiler
1f49b7e11c
align test numbers, also color expected output (#1815) 2022-10-11 08:39:08 +02:00
jguer
f496dbac8b
error refactor 2022-09-20 00:44:06 +02:00
jguer
bc4732e9e1
add debug mode 2022-09-20 00:11:10 +02:00
jguer
e4fdc9a4d4
readd makedep primitives 2022-09-20 00:01:19 +02:00
moson-mo
647d160182
add option/setting "AurRpcUrl" (#1809)
Signed-off-by: moson-mo <mo-son@mailbox.org>
2022-09-18 00:05:27 +00:00
jguer
c86c460816
fix typos 2022-09-17 14:45:07 +02:00
jguer
d646cd6c87
add base to name map 2022-09-17 14:31:54 +02:00
jguer
351e352f64
basic aur install 2022-09-11 23:15:31 +02:00
jguer
4a73dfb0ca
topo sorted map 2022-09-09 17:38:48 +02:00
jguer
d53505be37
allow customizing colors and embedding extra info 2022-09-07 01:03:29 +02:00
jguer
0aa18d61d5
cleanup 2022-09-07 00:01:23 +02:00
jguer
95e7542ade
Merge remote-tracking branch 'origin/next' into jguer/local-pkgbuild-install 2022-09-06 23:39:08 +02:00
jguer
cadeecc4df
add dep graph for local install 2022-09-06 23:38:47 +02:00
jguer
f7286b25ae
add local graph util 2022-09-06 23:25:44 +02:00
jguer
650809eba1
wip 2022-09-04 23:45:40 +02:00
linweiyuan
7ebe64871d
fix(yay): fix -Si alignment when language is Chinese (#1799) (#1803) 2022-08-29 15:33:48 +00:00
jguer
a4565b367b
wip 2022-08-23 18:33:40 +02:00
jguer
cce21ce0b6
Merge remote-tracking branch 'origin/next' into jguer/local-pkgbuild-install 2022-08-23 17:22:10 +02:00
Jo
714fee0b18
Chore: Cleanup (#1800) 2022-08-22 22:20:09 +00:00
jguer
b054828aa8
wip 2022-08-22 23:28:53 +02:00
Jo
2a2040c570
chore: use stdlib vars in code (#1793) 2022-08-14 17:41:54 +00:00
Jo
888fb4b1d0
Fix minor question and locale issues (#1786)
* add missing locales

* use t.Setenv instead of os.Setenv for tests

* locale: present y/n if localisation is not latin. Always accept y/n in every case

* question: use operation info for question

* edge case where localised n is equal to default y

* add tests for basic locales
2022-08-13 22:56:23 +00:00
jguer
1a52da5891
Make provides disabled by default. Add Migration to set provides to disabled 2022-08-05 22:55:54 +02:00
jguer
4d5131d6c7
fixed VCS temp file remove 2022-08-05 18:56:28 +02:00
vqrkxo
e0006ec272
feat(aur): add option to limit concurrent downloads (#1768)
* feat(aur): add option to limit concurrent downloads

Adds to config file option 'maxconcurrentdownloads' which if set to
value != 0, limits number of concurrent AUR downloads to specified.
Fixes #1763.

* fix lint issue
2022-06-28 12:05:29 +02:00
vqrkxo
18fbc24e68
fix(cmd): fix support for --defaultconfig (#1767)
This change fixes #1766.
2022-06-27 09:48:34 +02:00
Jguer
0fdfe79943
Add experimental vote util to yay (#1765)
* feat(vote): add vote utility

* update deps

* add vote and unvote capabilities

* use -W for web ops

* add fish completions

* add bash completion

* add zsh completion

* add md instructions
2022-06-17 16:55:22 +00:00
Jguer
44a0a243ed
remove gock from completion package (#1764)
* remove gock from completion package

* fix ci builder

* undo changes to default flow
2022-06-17 16:49:41 +00:00
jguer
5439229c7d
disable noseparatesources by default 2022-06-10 18:31:21 +02:00
Drumstickx
94cff87927
Fix ContinueTask user prompt for locales with uppercase yes (#1735)
* Fix ContinueTask user prompt for locales with uppercase yes

The yes/y strings have to be converted to lowercase to enable matching of
the user input converted to lowercase. Otherwise, locales with uppercase
yes/y strings (e.g., German: `Ja/J`) will never match.

* Addess linter issue

* Remove obsolete lowercase conversion
2022-03-31 14:19:43 +02:00
J Guerreiro
b8f054f988
fix(po): Update default po file (#1722)
* update default po file

* fix string
2022-03-07 10:35:20 +01:00
J Guerreiro
e4a1f018ea
feat(search): Add fuzzy name matching and mixed sources (#1719)
* fix(alpm): fix callback text

* feat(yay): Add mixed search result

* remove old result structs

* add option for controlling query builder

* only set query builder after parsing args

* add parser args

* update manpage

* write test for results

* write test for results

* mixed source test

* only sort 1 time with every mode
2022-03-06 23:48:15 +00:00
J Guerreiro
ae01f8e4a0
feat(config): Add version marker (#1720)
* only run on PRs

* prefer manual tags

* add defaults for tests

* cuddle assignment
2022-03-04 23:30:15 +00:00
xvqxy
b52e3cf0d2
fix(aur): -Ss fails on multi arg if no results. (#1716)
This fixes #1674.

If search command included multiple packages and no results were found
in AUR, response from `query.queryAUR` was returned
as nil slice instead of non-nil empty slice and as nil slice is treated
during subsequent validation in `query.SourceQueryBuilder.Results` as
meaning that searching in AUR was not executed, command was failing.
Now empty non-nil slice is returned if results were not found.
2022-02-21 09:14:11 +00:00
Eng Zer Jun
83a257b16b
test: use T.TempDir to create temporary test directory (#1709)
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-02-11 09:30:54 +01:00
J Guerreiro
7f5a060324
feat(yay): Add support for PACMAN_AUTH (#1706) 2022-02-08 09:39:41 +01:00
jguer
2a3ddafce5
fix(deps): fix conflict line being printed in new line 2022-02-06 10:49:57 +01:00
jguer
0e3affd876
fix(input): fix display in wrong line of number input 2022-02-06 10:44:33 +01:00
J Guerreiro
d83c5ca5a1
fix(deps): update deps (#1689) 2022-02-05 14:25:59 +01:00
mh4ckt3mh4ckt1c4s
e9d8894a37
Fix(AUR): Fix end of php use on AUR API (#1685)
* Fixed end of php use on AUR API

* Added a / to the end of rpc to respect the AUR RPC doc

* Removed the / due to the "AUR unavailable at this moment" error
2022-02-05 12:56:10 +00:00
jguer
1c22cc491c chore(linting): code lint 2022-01-03 13:46:52 +00:00
jguer
d02321bdc9 chore(dep): rename pool creator 2022-01-03 13:46:52 +00:00
Дамјан Георгиевски
f7dbebcc2c
fix(exec): add --quiet to systemd-run (#1654)
* add --quiet to systemd-run

this will avoid the `Press ^] three times within 1s to disconnect TTY.` message.

it's mentioned in the systemd-run man page too:
```
--quiet, -q
    Suppresses additional informational output while running. This is particularly useful in combination with --pty when it will suppress the
    initial message explaining how to terminate the TTY connection.
```

* add --quiet to the tests

* add --quiet to TestABSPKGBUILDRepoExistsPerms too
2021-12-20 17:49:25 +01:00
jguer
81eeb8c495
fix(download): use git pull --rebase --autostash instead of --ff-only. fixes #1635 2021-12-12 19:05:48 +01:00
Thomas Dupond
7e8d61c017 Prefer VISUAL over EDITOR for editmenu 2021-12-06 07:38:01 +00:00
jguer
e38d0138a6 feat(yay): simplify sort mode and use it for calculating number menu indices, fixes #1627 2021-11-07 00:18:26 +01:00
Matt Alexander
53e8ec70f8 fix(search): Fixed unit test; make test names unique and more descriptive 2021-11-05 09:26:34 +01:00
Matt Alexander
22c165a11f feat(search): add optional setting that formats each search result on a single line, Part II 2021-11-05 09:26:34 +01:00
Matt Alexander
673f077e7f feat(search): add optional setting that formats each search result on a single line 2021-11-05 09:26:34 +01:00
jguer
f88bf5c212
fix(search): in case there are no results, don't display number menu 2021-11-03 00:04:00 +01:00
jguer
15d91e4661
fix(search): revert repo query revert. Fixes #1623 2021-10-28 17:41:51 +02:00
jguer
57a9630054 chore(alpm): use text.getinput for ialpm 2021-10-27 23:45:23 +02:00
jguer
9eb73899fe chore(query): unify search in number menu selection and normal search 2021-10-27 23:45:23 +02:00
jguer
44cf54795d chore(text): use getInput for number pick deps 2021-10-27 23:45:23 +02:00
jguer
f925b719e8 chore(text): make input overflow its own error 2021-10-27 23:45:23 +02:00
jguer
e4b1cb6e7d chore(menus): squish clean menu into diff/edit menu 2021-10-27 23:45:23 +02:00
jguer
49577191c6 chore(menus): refactor editDiff menus 2021-10-27 23:45:23 +02:00
jguer
d096d15973 feat(menus): extract menus package 2021-10-27 23:45:23 +02:00
jguer
f3c3e2e4d4 fix(clean_menu): optimize any base installed 2021-10-27 23:45:23 +02:00
jguer
34e81d5d7d fix(clean_menu): clean menu errors don't exit yay anymore 2021-10-27 23:45:23 +02:00
jguer
3fef4ae1e3 test(build-dir): add regression tests for non-existing build dir 2021-10-15 19:58:59 +02:00
jguer
12a6d4f5c1
fix(cache): create build directory if not systemd-run directory. closes #1612 2021-10-15 19:22:28 +02:00
jguer
b2a728151e
test(news): remove parallel from test with race 2021-09-09 09:03:48 +02:00
jguer
84e872ebe3
test(news): add test case for edge case of news in same day as build 2021-09-08 22:48:55 +02:00
jguer
555d1ead95
chore(version): bump major version 2021-09-08 22:28:08 +02:00
jguer
ba1e06d367
feat(cmd): remove unused absdir option 2021-09-08 22:25:55 +02:00
jguer
adb74b9252 chore(su): prefer short form if 2021-09-07 00:41:36 +02:00
jguer
ffb17fd2e3 feat(su): deelevate if ran as su without tool 2021-09-07 00:41:36 +02:00
jguer
bc1d900fa9 feat(su): deelevate if ran as su using a privilege elevation tool 2021-09-07 00:41:36 +02:00
jguer
c8fcdeae5b feat(su): use alternative privilege elevators when sudo is not available
When sudobin/custom wrapper is not available try the following in order:

- sudo
- doas
- pkexec
- su
2021-08-31 02:17:27 +02:00
Eng Zer Jun
e43c712c84 refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-08-26 15:17:47 +02:00
jguer
e231b2b02d chore(yay): modernize exec commands 2021-08-14 00:10:43 +02:00
jguer
95bc333a92 test(yay): port tests to parallel 2021-08-11 22:19:55 +02:00
jguer
cb4b57f6d8 chore(golangci): add new linters 2021-08-11 22:19:55 +02:00
jguer
08d1305ec5 feat(download): respect aur url settings and update deps 2021-08-11 22:19:55 +02:00
jguer
f42cbde6db refactor(parser): unify atleast modes 2021-08-09 13:32:55 +02:00
jguer
5c11c01d85 refactor(exe): move sudo loop into CmdBuilder 2021-08-08 21:02:35 +02:00
jguer
444151de0d refactor(vcs): implement GitBuilder interface 2021-08-08 17:45:07 +02:00
jguer
172ee1f4e8 refactor(exe): port pacman calls to cmd_builder 2021-08-08 17:45:07 +02:00
jguer
1a2e5b9529 refactor(settings): move args to own package to allow pacman cmd builder 2021-08-08 17:45:07 +02:00
jguer
456d83ef51 fix(download): cloned reflects if package was pulled or cloned 2021-08-07 19:17:58 +02:00
jguer
186c7a54fe fix(dep): ensure assume-installed works with depstrings 2021-08-07 19:17:58 +02:00
Jonas Bögle
7dda0fa2f8 fix: skip --assume-installed packages 2021-08-07 19:17:58 +02:00
jguer
4a515c4462 test(downloads): remove non reproducible tests 2021-08-05 10:11:54 +02:00
jguer
ab902e9cc6 chore(vcs): port VCS to download package 2021-08-05 10:11:54 +02:00
jguer
b8641256ab chore(download): rename PKGBUILD function to match package 2021-08-05 10:11:54 +02:00
jguer
2ed099a263 chore(download): unify filtering logic between commands 2021-08-05 10:11:54 +02:00
jguer
98378642bc test(download): add tests for repo downloading 2021-08-05 10:11:54 +02:00
jguer
413ad23abc chore(download): rename public functions 2021-08-05 10:11:54 +02:00
jguer
79b44fd544 feat(download): download PKGBUILD repos interface 2021-08-05 10:11:54 +02:00
jguer
50c0ece9a7 chore(style): run gofumpt on packages 2021-08-05 10:11:54 +02:00
jguer
20d5fd406f fix(download): fix -Gp for repository packages 2021-07-26 09:07:27 +02:00
Oliver Mangold
4a9319920b fixing URLs for ABS after upstream change from git.archlinux.org to github 2021-07-13 18:39:18 +02:00
jguer
61e38ad2fc chore(pacman): remove pacman 5 support 2021-07-03 18:27:14 +02:00
jguer
169d5f1f62 fix(vcs): make command error more explicit 2021-07-03 17:15:36 +02:00
jguer
040c8fe380 fix(aur): fix lint issue 2021-06-09 03:57:37 +02:00
jguer
a37f4efd73 chore(http): use client for pkg completions 2021-06-09 03:57:37 +02:00
jguer
c7cf7baa48 chore(http): use client for news feed 2021-06-09 03:57:37 +02:00
jguer
e20ab8b6a2 fix(aur): fix wrong string usage 2021-06-09 03:57:37 +02:00
jguer
545ea772eb feat(aur): customize User Agent 2021-06-09 03:57:37 +02:00
jguer
8e6d098ff8
fix(deps): fix regression on CombinedDepList 2021-05-08 00:29:33 +02:00
x1b6e6
faf03436a7 Sync with go-alpm v2.0.5 2021-05-07 23:30:08 +02:00
x1b6e6
767c7975f3 fix test using multiple 'Architecture' value
Signed-off-by: x1b6e6 <ftdabcde@gmail.com>
2021-05-04 08:43:56 +02:00
x1b6e6
de113b87f3 Add support for multiple 'Architecture' values
This allows architecture to be multivalued. On x86-64 machines, this
could be something like:
    Architecture = x86-64-v3 x86-64

We use the first specified Architecture value in mirrorlist $arch
variable replacement, as this is backwards-compatible and sane.

More info:
https://git.archlinux.org/pacman.git/commit/?id=3179db108a83104d9de6d1d607f55f8118e92160

Signed-off-by: x1b6e6 <ftdabcde@gmail.com>
2021-05-04 08:43:56 +02:00
morganamilo
29f4c43227 Sort upslice by pacman repo order 2021-04-24 17:28:53 +02:00
morganamilo
f04a469324 Make UpSlice a struct instead of a type alias 2021-04-24 17:28:53 +02:00
Ferdinand Bachmann
64e5b9e93d fix(query): allocate capacity in filterDebugPkgs
(addresses review in PR #1484 by Jguer)
2021-04-20 22:01:46 +02:00
Ferdinand Bachmann
3efb43af95 feat(query): list debug packages missing from AUR separately 2021-04-20 22:01:46 +02:00
jguer
d1a6ead81c style(deps): reduce scope where possible 2021-03-17 23:18:44 +01:00
jguer
a33f43f502 feat(deps): don't install check deps if --nocheck is passed.
feat(makepkg): automatically pass -d to makepkg if -dd is passed
2021-03-17 23:18:44 +01:00
jguer
d7424b1b28 feat(install): implement support for -dd 2021-03-17 23:18:44 +01:00
jguer
5da8161328 chore(install): reduce cognitive load 2021-03-17 23:18:44 +01:00
D1CED
c8a74cb4a4 prevent leaking goroutines 2021-03-12 20:41:55 +01:00
D1CED
eb9ff86aa9 fixed lint issues 2021-03-12 18:11:30 +01:00
Jannis M. Hoffmann
1a8ee2012d removed alpm dependency from download 2021-03-12 18:11:30 +01:00
Jannis M. Hoffmann
df1361aa05 moved Upgrade to db
to reduce dependencies
2021-03-12 18:11:30 +01:00
Jannis M. Hoffmann
5d2c763fdb reroute dep->rpc dependency via query 2021-03-12 18:11:30 +01:00
Jannis M. Hoffmann
34f7dbc7fc Narrow interface in completion 2021-03-12 18:11:30 +01:00
Jannis M. Hoffmann
5993613c53 Added type alias for alpm types in db 2021-03-12 18:11:30 +01:00
xvqxy
9fc6d9c128 fix(query): Respect --deps and --explicit.
This fixes #1283.

yay --query --upgrades [--explicit|--deps] will not return same packages pacman
does extended with AUR packages.
yay --show --numberupgrades [--explicit|--deps] will also work.
2021-02-14 22:38:49 +01:00
jguer
afc72daba7
test(download): test pkgbuild fetching 2021-01-31 19:07:08 +01:00
jguer
ee3c51f6f2
feat(pkgbuild): extract logic 2021-01-31 19:07:08 +01:00
xhqr
24edabe5df Print error if PATH is empty.
This fixes #881.

Before:
```bash
$ PATH= /usr/bin/yay -Qu
$ echo $?
1
```

After:
```bash
$ PATH= ./yay -Qu
exec: "pacman-conf": executable file not found in $PATH
$ echo $?
1
```
2021-01-16 18:27:39 +01:00
ccat3z
bb50b4079f fix(exe): fix timeout of OSRunner.Capture()
kill all child processes
2020-12-10 09:07:33 +01:00
jguer
182f4c7f6c
test(pgp): temporary fix for random order test 2020-12-10 00:29:56 +01:00
jguer
8d9fed2ad0
fix(query): fix remote package slow filtering 2020-11-16 08:59:35 +01:00
Kazuki Sawada
8c4fe837d3 Fill fields of CmdBuilder with options specified in commandline 2020-11-15 15:13:44 +01:00
jguer
6beefb1400
fix(config): fix save config 2020-11-01 09:09:38 +01:00
lwlf
497f94ca9f
parent 55a6767b44
author lwlf <wuhaojie_2011@sina.com> 1603706823 +0800
committer jguer <me@jguer.space> 1604217613 +0100
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEP4pAozwhlAIAKURxbWzJvqhVazUFAl+eaw0ACgkQbWzJvqhV
 azU8Dg//XEcgshJ3DqS54kGDOhOXvp3RGWDW6EGYS9UG22ul6af2Yxgt+sNksQY2
 oaTBV2TiQ979AWikJ70waTLQEkkqqkbG1eKz0AWniQQuHPmpTu/9CA6e5hX5f+nh
 AdeUdvz8UcxRd2n80YCVYv7KEs2QkR1ZU4gE+42BG/ohdWSoAxfd1S/skDJ2uYjx
 VUu/ZVYh1qsgLhoIqLpnKzv0jPDVvbpzQ0il+1Zyl2P7qC8QKDTHkfajO6FQV46t
 74anbsk1HrwJSK2G8Z25h/vzi+6Vz36koS7A8mQCLz4jpQZho0Ax7wkhPwLhYSNf
 8CRTK8uoyczTLECOBXnwwrQoDl21N4EgqzZWDBso6DEozBZMteSd74liye3FAXff
 vWmN12pf6nh8uUN5kUGaj/Jq6XWij0cdU4vM0CpRzlzAw3OV4Z0RTwVHqAy6qU6J
 M73cIwVjzVEmPAjWlD2y1ZbTNFUsbWNZ4iqxWXcvc2IOuR4Ywjv+T45NcFXB6RcZ
 PoEivscWy/nEkmihtn9bAIhZXze/UMgIktOV8FyrYFizlVNmZ3HuFPlu6tXRFIZK
 RdGbTeLunPGMLg8iw5C9rKe8/vvsVlUpLUiguyr7w3vUS9QpxLPd8mHlsUETp3p2
 OKxz3zD4/BRaRmuL6Gef7KeroCvJYZGnVpTHPHoOENkSzGxqHCk=
 =D+N6
 -----END PGP SIGNATURE-----

unsaved config when yay's config path does not exist

unsaved config when yay's config path does not exist

unsaved config when yay's config path does not exist

unsaved config when yay's config path does not exist

unsaved config when yay's config path does not exist

fix: unsaved config when yay's config path does not exist

fix: unsaved config when yay's config path does not exist

fix: unsaved config when yay's config path does not exist

fix: unsaved config when yay's config path does not exist

fix: unsaved config when yay's config path does not exist
2020-11-01 09:00:47 +01:00
jguer
55a6767b44 fix(parser): use Fields instead of Split 2020-10-30 11:09:06 +01:00
jguer
81b5feb68a fix(passer): fix slice copying for passer 2020-10-30 11:09:06 +01:00
jguer
7d080df6ac fix(config): fix mflags and gitflags 2020-10-26 09:32:22 +01:00
jguer
c4dc9bec6e fix(ialpm): fix typo 2020-10-26 09:32:22 +01:00
jguer
f6cb0bc460
fix(provide): fix dep pool populate with unversioned deps 2020-10-06 13:40:19 +02:00
jguer
7979279c3f
fix(provide): fix provides not finding pagure-database=5.1.0 2020-10-06 06:25:18 +02:00
jguer
678d10e04e
fix(upgrade): export upgrades 2020-10-01 14:06:21 +02:00
jguer
3e698f313a
test(alpm): implement alpm interfaces 2020-10-01 13:38:03 +02:00
jguer
d6aa288ab8
fix(alpm): update alpm version 2020-09-20 17:00:45 +02:00
x-usr
5ae510ad6f fix(display): adapt padding to match pacman's.
This change fixes part of #1332 related to splitting information into
multiple lines.
Change is implemented based on current pacman's code.
2020-09-07 23:39:19 +02:00
jguer
5c05811ae5
fix(config): fix unsaved config 2020-09-03 18:26:57 +02:00
jguer
3b2bb28e81
feat(exe): AddMakepkg builder 2020-08-22 01:24:52 +02:00
jguer
1db50882e9
feat(vcs): refactor and test cover 2020-08-22 00:39:26 +02:00
jguer
72f120b0f3
feat(config): refactor config to allow running without config 2020-08-21 02:39:52 +02:00
jguer
c5af6f8189
feat(vcs): package vcs 2020-08-21 02:37:03 +02:00