Commit graph

116 commits

Author SHA1 Message Date
Joey Holtzman d02c45e5b6
Remove deprecated flags in favor of boolean flags (#2350) 2024-01-25 16:03:47 +01:00
Joey Holtzman d368f99be0
feat(yay): add boolean flags (#2285)
* feat(yay): add boolean flags

This feature now allows users to specify --<option>=<bool value> instead
of using --<option> and --no<option>. Specifying nothing results in the
boolean value being true. The flags prefixed with `no` are deprecated.

* chore(args): Print warning when using deprecated flags

* chore(yay): Update man page for deprecated options and add examples of
boolean flags being used
2023-09-27 12:36:57 +02:00
Jo 299aa1e123
fix(download): do not garble download output by default (#2283)
limit default concurrent downloads to 1
2023-09-18 09:51:32 +02:00
Joey Holtzman 04c76a404e
feat(install): add --keepsrc to keep pkg/ and src/ directories (#2272)
* feat(install): add --nocleanbuild to keep pkg/ and src/ directories for
AUR packages

Providing this flag during installation of AUR packages allows for keeping
the src/ and pkg/ directories produced my makepkg. If the user wants to
delete the directories, they can either select to cleanBuild in the
cleanmenu or run the installation without the --nocleanbuild flag (yay
will only remove the directories if the package is rebuilt)

* fix(completion): simplify description for --nocleanbuild in fish

This makes the description consistent with the descriptions in the
man page, --help, and zsh completion.

* refactor(install): Rename --nocleanbuild to --keepsrc

This naming scheme is more familiar to users since it is the name of the
flag in Paru.

---------

Co-authored-by: jguer <me@jguer.space>
2023-09-18 09:21:42 +02:00
Jo 8916cd174b
refactor(yay): move cfg inside of runtime (#2259)
* rework relationship between runtime and cfg

* separate runtime from cfg

* simplify instantiation logic

* move installer to appropriate package

* move operator to sync package

* add tests for srcinfo service

* consolidate srcinfo service in sync

* add logger to srcinfo

* add logger to preparer

* remove unused text functions

* remove remaining text.* from srcinfo

* remove global logger parts

* remove global org method exports

* remove global logger

* move text->input

* add rule to prevent fmt.Print

* update golangci go version

* remove outdated FAQs

* remove outdated FAQs
2023-08-06 21:39:41 +02:00
smolx adde043514
Add --askyesremovemake option (#2199)
Same as --askremovemake option but with "Y" as a default answer.
2023-06-11 16:13:01 +00:00
smolx 0607090719
Fix deps resolving for installs from SRCINFO (#2190)
Also made MockBuilder and MockRunner thread-safe.
2023-06-03 13:53:33 +00:00
Jo e28319fece
chore(yay): lift legacy engine (#2189)
* remove legacy engine

* remove legacy dep handlers

* use prepare for gendb

* remove unused method

* remove aur client old interface

* remove unused menu fns

* remove inactive upgrademenu option

* unexport printInfo
2023-05-24 08:22:18 +00:00
smolx 56d1b7ed1c
Fix --rebuild option (#2163)
* Reimplement --rebuild option in the new engine (#2153)

* Refactor --rebuild option

* Fix comment formatting
2023-05-23 21:16:27 +00:00
Jo fdcf6ef664
ci(yay): add integration test framework (#2178)
* add integration test framework

* fix integration tests

* fix integration tests
2023-05-22 21:38:02 +00:00
Jo d568a73ab8
fix(metadata): reduce cache validity (#2161)
fix metadata cache validity too long
2023-05-15 08:30:41 +00:00
Jo 49267b9cd9
feat(upgrade): separate menu for pulled along dependencies (#2141)
try separate menu for pulled along

use installed as term

fix order gap

fix tests

add aur db + aur scenario
2023-04-27 07:20:21 +00:00
Jo 88008e4eb3
feat(yay): skip confirmed confirms (#2107)
* skip pacman confirmations when yay confirmations are done

* default to double confirm

* fix tests
2023-04-11 11:51:39 +00:00
Jo c7a51a1614
fix(text): ensure error logs go to stderr (#2105)
ensure Error logs go to stderr
2023-04-10 16:26:09 +00:00
Jo ce0cb35510
feat(new_engine): add support for --nocombinedupgrade (#2083)
* feat(new_engine): add support for --nocombinedupgrade

* update en.po
2023-04-06 11:54:03 +00:00
Jo 7bc4a666e6
refactor(runtime): Build runtime after cmdargs parsing (#1965)
* extract runtime building from cfg

* respect AURRPCURL

* use -Syu if there are no targets, allows to pass extra options

* one more step towards removing runtime from cfg
2023-03-13 08:48:39 +00:00
Jo f11f9058c2
fix(logger): respect --debug for setting debug logger (#1955)
respect --debug parse
2023-03-08 21:33:43 +00:00
Jo 3d5a43c294
chore(yay): bump version (#1949)
bump major
2023-03-07 21:04:06 +00:00
Jo 463e60e045
chore(deps): update goalpm (#1947)
* update dependencies

* use logger in cmd runner
2023-03-06 09:19:21 +00:00
Jo fa2e726ca6
chore(text): use logger in new engine services (#1939)
* use logger in vcs

* use logger in query builder

* use logger in migrations
2023-02-25 19:03:27 +00:00
Jo 61f1bdf291
fix(cmd): propagate sigterm to spawned processes (#1927)
propagate sigterm to spawned processes
2023-02-21 02:49:33 +00:00
Jo 7c8f273cdf
fix(git): add git denylist for workspace variables (#1926)
add git denylist for workspace variables
2023-02-21 02:23:48 +00:00
Jo 7490836991
fix(new_engine): respect --needed on target gathering (fixes #1552) (#1920)
* use logger in dep graph

* use logger in dep graph

* use logger in dep graph

* only query for AUR packages once per tier. useful for rpc

* fix performance regression for ros-melodic

* prefer name search first

* implement needed at target gathering

* set default config

* fixup tests for needed
2023-02-20 23:14:59 +00:00
Jo f1d086df1d
Allow use of rpc client as an alternative to the metadata client (#1918)
* use updated aur client

* add logger to rpc client

* update go.mod
2023-02-20 11:20:48 +00:00
Jo 0bf4c2e502
feat(new_install): show (#1915)
* show new packages in upgrade form if they exist

* refactor up select

* remove unused graph parts

* readd len

* Complete upgrade graphing

* Extract to upgrade pkg

* remove unused dep method

* remove uneeded dep

* cleanup method

* specify io Reader for testing

* use specified input vector

* fix non-active devel

* test base cases

* add devel test cases

* add range tests

* add logger struct

* use logger struct in upgrade

* follow golangci recommendations

* update deps

* update golangci
2023-02-17 19:01:26 +00:00
Jo 9356481d1c
fix(config): expand tilde for some config fields. Fixes #1774 (#1897)
expande tilde for some fields. Fixes #1774
2023-01-22 23:21:05 +00:00
Jo b8debd1ae7
chore(yay): fix small linting issues (#1885)
* replace context.TODO() in tests context.Background()

* remove mock TODOs

* prettier

* apply missing linting
2023-01-03 21:43:56 +00:00
Joey H 8948278568
fix(parser): ensure data is piped when using '-' argument (#1881)
fix(parser): ensure data is piped when using '-' argument

Fixes #1626.

Check to see if data was actually piped to yay, otherwise it will hang
forever. This error will give users better feedback of how to use the
'-' argument (it is also the same exact error pacman throws for invalid
piped data).

Two tests were added. However, I didn't know how to add a test for the
actual part that detects whether data was piped or not (which is
essentially what this commit adds).
2023-01-03 19:43:15 +00:00
Jo f372494d74
feat(search): add new bys and misc fixes (#1870)
* use default bin entry of gpg

* fix(dep): fix displayed information in chosen provide

* add new rpc bys to searchby

* man document
2022-12-30 19:02:32 +00:00
Jo 9be51052f7
update deps (#1868)
* update deps

* align struct
2022-12-29 18:42:43 +00:00
Jo 28d90c981e
feat(new engine): local install feature testing (#1867)
* make config into parameter

* test(new engine): local install test

* test(keys): fix test keys

* complete integration test for local install

* add simple mising mechanism
2022-12-29 12:34:53 +00:00
Jo 4a3e365fc5
AUR provides search rpc (#1856)
* add support for provides search in AUR RPC client

* return provides search to default true
2022-12-18 02:36:49 +01:00
Jo 7da9f4869d
feat(new engine): skip built and respect --needed (#1852)
* add built package check

* respect --needed for new engine

* add needed check and test

* add test for not built
2022-12-16 17:23:44 +00:00
Jo 6ad63cae10
fix: rework menus to work on both flows (#1830)
* rework menus to work on both flows

* add installed package split

* remove unused field

* Add post install hooks
2022-11-20 00:51:55 +00:00
jguer 085e2c8aea
rename -Ui to -Bi 2022-11-16 00:51:57 +01:00
jguer 2358a7f66e
use aur package metadata client 2022-11-16 00:25:17 +01:00
jguer c00cd8d88e
rename AUR metadata client 2022-11-15 16:22:57 +01:00
jguer f042713aaa
fix: fix linting errors 2022-11-15 15:44:50 +01:00
jguer 01721c816c
refactor query builder to include AURClient 2022-11-13 14:29:00 +01:00
jguer 742b6ad79c
use aur cache for upgrades 2022-11-08 01:32:21 +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 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 f7286b25ae
add local graph util 2022-09-06 23:25:44 +02: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
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