Commit graph

328 commits

Author SHA1 Message Date
Daniel Oh
c2ed16c513 add short option for --repo 2024-02-23 04:42:51 -06:00
Jo
e8080f87c2
chore(yay): fix breaking -git ci test (#2373)
* chore(yay): fix breaking test

* chore(yay): fix breaking test

* chore(yay): fix breaking test

* update gomod

* remove debug commands
2024-02-19 17:04:06 +01:00
Jo
26aa171b2b
fix(query): remove -debug packages from missing list if base package is installed (#2372)
* chore(yay): fix pre-commit

* chore(yay): fix git ignore
2024-02-19 10:29:47 +00:00
Joey Holtzman
d02c45e5b6
Remove deprecated flags in favor of boolean flags (#2350) 2024-01-25 16:03:47 +01:00
Eng Zer Jun
d23e8925fa
fix(dep_graph): fix panic on selecting AUR providers (#2333)
This commit fixes https://github.com/Jguer/yay/issues/2289 by making
`provideMenu` returns the first option when it receives an error input
from the user (e.g. user sends EOF).

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-12-11 17:45:54 +01:00
Kirill Motkov
0771ded99b
Refactor AURPKGBUILDRepos and Fix Localization Command in Makefile (#2313)
* optimize mutex usage and logging in AURPKGBUILDRepos function

* fix localization script

Fix localization script Makefile by adding missing semicolon and --no-translator flag
2023-11-20 16:58:20 +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
e60ccdf8b7
Fix image recursive build (#2280)
* fix image recursive build

* add test fixes

* disable buildvcs

* fix integration
2023-09-15 11:17:18 +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
Jo
5995e55ddb
chore(topo): move topo to where it's used (#2250)
move topo into dep
2023-07-23 20:20:05 +00:00
Jo
04c82b8112
chore(yay): replace custom set package with dep (#2249)
* replace string set with dep

* remove unused field

* remove custom string set package
2023-07-23 17:29:01 +00:00
Joey Holtzman
dadc8c0d98
Re-add functionality for Installed and NotInstalled options in the menus (#2233)
* fix(menus): Handle Installed and NotInstalled options correctly in the
menus

This functionality was temporarily removed. This commit adds that
functionality back.

* fix(tests): Mock InstalledRemotePackageNamesFn when necessary
2023-07-06 06:54:21 +00:00
smolx
6dd7933fbe
Fix handling targets with specified db (#2218)
* Fix handling targets with specified db

Handle it in a similar way to handling targets with unspecified db.

Also refactored GraphSyncPkg method to make stuff more DRY.

* update go-mod
2023-07-06 06:53:46 +00:00
Jo
5b8cc98afa
fix(dep_graph): do not package provides when providing itself. fix: #2215 (#2216)
fix #2215. package provides itself
2023-06-19 08:13:47 +00:00
smolx
c5a18e5000
Fix install reason preservation when package is reinstalled (#2195) 2023-06-11 16:16:05 +00: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
7dc4fae155
Fix excluding of packages with unsatisfied deps (#2203)
* Fix excluding of packages with unsatisfied deps

When dependency is unsatisfied, add to the graph not only a dep node,
but relationship with parent too.

* Remove excess(duplicate) logic

* Add test cases of upgrading with unsatisfied deps
2023-06-11 16:10:48 +00:00
smolx
12282fb28a
Fix sorting by name in package search (#2198)
Slightly reorganize and add more tests for SourceQueryBuilder.
2023-06-03 14:01:17 +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
moson-mo
1335e9b4e0
fix(pkgbuild): convert package name for gitlab URLs (#2191)
Convert package names to gitlab repo names

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-25 11:00:33 +02: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
c1aa71bee1
Fix AUR dependency resolving (#2169)
Before this fix dependencies for AUR targets were added to the graph
after each addition of a target node. Now dependencies are added only
after all target nodes are added to the graph.

Also added some tests for previously bugged cases.
2023-05-23 21:18:41 +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
df3dbfa125
chore(yay): update po (#2180)
* update po

* avoid extra translate work
2023-05-22 21:52:06 +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
39f0d4e9a1
chore(yay): remove unused constant (#2179)
remove unused constant

Co-authored-by: christian-heusel <christian@heusel.eu>
2023-05-22 20:59:30 +00:00
Andrew Geng
d33bf8841d
Fix yay -Sc wiping ~/.cache/yay on 3rd question. (#2175)
If you answer yes to
    :: Do you want to remove all other AUR packages from cache? [Y/n]
then we run cleanAUR(), intending to remove subdirectories of
~/.cache/yay that do not share a name with installed packages not
found in the sync repositories.

Where this was going wrong was cleanAUR() was getting an empty map from
dbExecutor.InstalledRemotePackages()---because InstalledRemotePackages
only recomputes its result if installedRemotePkgMap is nil, whereas
NewExecutor initialized it to an empty map. The symptom was it emptied
my ~/.cache/yay.

We do want a non-nil, empty installedRemotePkgMap to block recomputing
(that is, to indicate the user really has no remote packages), so now
NewExecutor initializes it to nil, and getPackageNamesBySource is
responsible for making sure it's non-nil before writing to it.

Fixes #2152, which seems to have been introduced in
4626a0409c.
2023-05-22 20:34:51 +00:00
Jo
bd79057fd9
feat(pkgbuild): use gitlab git repo for retrieving PKGBUILDs (#2177)
use gitlab git repo for retrieving PKGBUILDs
2023-05-22 20:22:49 +00:00
smolx
ec15a5b363
Implement tests for -Qu/q (#2156)
Implement tests for -Qu/q (#2061)
2023-05-15 10:33:12 +02:00
Jo
d568a73ab8
fix(metadata): reduce cache validity (#2161)
fix metadata cache validity too long
2023-05-15 08:30:41 +00:00
Joaquim Monteiro
490ebe4f7f
Fix formatting of error message that occurs on AUR errors (#2154)
fix: fix formatting of error message that occurs on AUR errors
2023-05-08 21:43:50 +00:00
Jo
f7731d7cf9
fix(groups): fix sync group getting passed to reason setter (#2148)
fix sync group install #2137
2023-05-01 16:21:40 +00:00
Jo
966bfb74ee
feat(dep): add provider resolution on first layer (#2147)
add provider resolution on first layer
2023-05-01 15:56:42 +00:00
Tanmay Chaudhry
4832ec59db
Fix version diff word detection (#2124)
* Fix version diff word detection

* remove double negation

* preserve text color after tests
2023-04-27 07:23:25 +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
e6344100e6
fix(upgrade): fix local pulled dependencies replacing upgrade information (#2140)
avoid upgrade info loss

fix colormap
2023-04-27 07:04:09 +00:00
Tanmay Chaudhry
15400c5fc5
Switch the TZ to UTC temporarily for running the News tests (#2121)
* switch the TZ to UTC temporarily for running the tests

* Remove unnecessary environment reset

* Set test specific environment.

Co-authored-by: Jo <me@jguer.space>

---------

Co-authored-by: Jo <me@jguer.space>
2023-04-26 13:54:37 +02:00
Jo
57a3a090f1
fix(vcs): improve timeout handling for vcs upgrade check (#2120)
remove timeout from full operation and increase timeout for single checking
2023-04-16 16:23:10 +00:00
Jo
83214fbc1c
chore(yay): add local newer to AUR warnings (#2113) 2023-04-11 21:15:47 +00:00
Jo
161fede450
chore(yay): use new aur client for -Si (#2112)
* chore(yay): use new aur client for -Si

* chore(yay): use new client for clean
2023-04-11 21:15:21 +00:00
Jo
26c9ab5a87
fix(yay): fix panic -Si when package is missing (#2111)
fix panic -Si
2023-04-11 16:45:20 +00:00
Jo
4a9c736e2a
chore(upgrade): add makedep explain to the upgrade menu (#2110)
* display required by

* cutoff at 2
2023-04-11 16:41:34 +00:00
adasauce
76e5ee1fa6
fix: querybuilder GetTargets start iteration at 1, when include is 0 causes a crash (#2109) 2023-04-11 16:23:19 +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
511b95769e
docs(yay): correct order of editor var evaluation (#2104)
correct documentation on order of editor preference. Use logger for editfn
2023-04-10 15:46:46 +00:00
Jo
1ee94f28d3
fix(new_engine): add missing warnings to AUR updates (#2087)
* add missing warnings to AUR updates

* fix tests
2023-04-06 17:06:46 +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