Commit Graph

144 Commits

Author SHA1 Message Date
morganamilo
42f0508625
Add upgrademenu to match {clean,diff,edit}menu 2018-06-11 20:12:17 +01:00
morganamilo
d0bc1d70d9
Document new flags 2018-06-11 20:11:38 +01:00
morganamilo
01fa34093f
Support answerdiff to match answer{clean,edit} 2018-06-11 20:11:38 +01:00
morganamilo
8430c41be9
Rework editing and diff showing
Clean build needs to happen before downloading pkgbuilds so that they
can be deletd before downloading.

Editing and diff viewing needs to happen after downloading the
pkgbuilds.

Prevously we asked to clean and edit at the same time. Then clean,
download pkgbuilds and open the editor.

This poeses a problem for diff viewing and editing. It's likley that the
user will see the diff and use that to decide if they want to edit the
pkgbuild. Using the current method, the user will be asked to view diffs
and edit before actually seeing any diffs.

Instead split cleaning diff showing and editing to three seperate menus
in the following order:
	show clean menu
	clean
	download pkgbuilds
	show diff menu
	show diffs
	show edit menu
	edit pkgbuilds

Also each menu is seperatly enableable. By default only the diff menu is
shows. If the user wishes to clean build, edit pkgbuilds or disable
diffs then the user can use the --[no]{clean,diff,edit}menu flags. This
replaces the --[no]showdiffs flags.
2018-06-10 16:11:23 +01:00
morganamilo
ced35af515
Support --aur/--repo for -Ss and -Y 2018-06-04 20:36:10 +01:00
morganamilo
a71784684c
Add new options to usage 2018-06-04 19:16:43 +01:00
morganamilo
5f2933271a
Use slices for targets instead of stringsets
The order of targets does somewhat matter. For example doing something
like 'pacman -S db1/foo db2/foo' should cause the second package to be
skipped.

The order of targets also effects in which order they are resolved. This
should make errors more reproducable if any ever occur.
2018-06-02 17:56:09 +01:00
morganamilo
f20fbd25c1
Implement diffs for pkgbuild viewing.
diff viewing can be toggled via --[no]showdiffs. When enabled diffs will
be shown for packages between the current HEAD and upstream's HEAD.
Packages downloaded via tarballs will be shown in full using the editor

git diff is used to show diffs. Therefore the pager for diffs can be
set via the PAGER and GIT_PAGER enviroment variables.
2018-06-01 18:11:13 +01:00
morganamilo
682040319e
Add config option for pgp key fetching 2018-05-31 16:36:36 +01:00
morganamilo
0ae8fc2a06
Support --aur and --repo flags
These flags limit operations to only check the repos or only check the
AUR. These flags apply to -S, -Si and -Su.

-a may also be used as a short option for --aur. --repo has no short
option as -r is taken.
2018-05-31 16:25:49 +01:00
morganamilo
c464af6b9b
Implement config option for provider searching 2018-05-29 17:40:35 +01:00
Jonas Thiem
976876961b Add completions for --news 2018-05-06 03:31:09 +02:00
Jonas Thiem
8dd08327b1 Add --news to --print 2018-05-06 02:26:03 +02:00
morganamilo
99c7b5bb44
Update man page and tweak usage 2018-04-23 02:24:23 +01:00
morganamilo
63471b9ede
Fix misspellings and typos 2018-04-17 18:01:34 +01:00
morganamilo
86bfacd253
Remove unneeded vars and fix missing err check 2018-04-17 17:57:02 +01:00
morganamilo
683890c1b8
Add support for -Sc
-Sc will delete cached AUR data from Yay's build dir according to
the `CleanMethod` specified in the Pacman config file.

-Scc will delete all cached AUR data.

Additionally -Sc will also delete all untracked files in the AUR cache.
This will delete things such as downloaded sources and built packages
but will leave directories behind.

This is very usefull because the only reason a directoiry should exist
in the cache is because of downloaded VCS sources. Non VCS sources are
redownloaded every update because when a new version is released a new
tarball has to be downloaded. But VCS sources are never redownloaded,
updates are simply pulled. For this reason the user probably wants to
keep this data as it is still usefull even after building and installing
a package.
2018-04-17 13:53:37 +01:00
Jguer
cfd244f377 Add missing entries
Signed-off-by: Jguer <me@jguer.space>
2018-04-16 14:13:11 +01:00
morganamilo
cf47746d20 Use git clone for pkgbuild downloading
Use git clone over tarballs for pkgbuild downloading during -S. This
option can still be toggled using the config flags.

The config option for selecting clone or tarball will be overiden if an
existing package is cached. The method used to download the package
perviously will be used regardless of the config.
2018-04-16 14:12:02 +01:00
morganamilo
6d876a738c Add --gitflags and --[no]gitclone flags 2018-04-16 13:42:15 +01:00
morganamilo
24f596959d
Dont bump pkgver() while downloading sources
Previously we ran pkgver() right after dowloading sources. This is
a problem because prepare() should be called and all dependencies
should be installed before pkgver().

Instead bump the pkgver while building then get the new pkgver used for
install. Previously we parsed `makepkg --printsrcinfo` to get the new
version. Insead use `makepkg --packagelist` as it is much faster.
2018-04-16 00:17:56 +01:00
morganamilo
f1e98e45a6
Support flags when using the editor
Added --editorflags alongside --editor
$VISUAL and $EDITOR are split on whitespace
2018-04-09 20:50:18 +01:00
Morgana
13ef6f66ab
Merge pull request #275 from ratorx/master
Recursively remove dependencies when using yay -Yc
2018-04-09 17:01:00 +01:00
morganamilo
e05d86b31b
Document fcf0ee34d1 2018-04-08 15:49:56 +01:00
Reeto Chatterjee
992c27e82e
Merge branch 'master' into master 2018-04-07 16:42:56 +00:00
morganamilo
855c6c841c
Update usage and man page for new flags 2018-04-05 19:25:17 +01:00
morganamilo
8556acdd5f
Add flags for sort order and automating menu input
Added:

--sortby <votes|popularity|id|baseid|name|base|submitted|modified>
--answerclean
--answeredit
--answerupgrade
--noanswerclean
--noansweredit
--noanswerupgrade

TODO: docs and completion
2018-04-04 21:53:32 +01:00
morganamilo
faf607c624
Allow help to be used with all Operators 2018-04-03 18:01:18 +01:00
morganamilo
b8ef531b76
Strip request targets instead of making a new one 2018-04-03 17:48:56 +01:00
morganamilo
5bcb51bf00
Don't abort during AUR search error 2018-04-03 06:49:41 +01:00
morganamilo
fe3743c5ba
Try each search term against RPC if one fails
Allows searching the RPC for words that may be too short or have
too many results as long as another word in the search will work.

If no words can be used without error then the last error will be
returned and the program will exit.
2018-04-02 15:27:07 +01:00
J Guerreiro
91eb2585e9
Merge pull request #286 from Morganamilo/noerr
Suppress pacman error printing
2018-03-25 18:05:25 +02:00
Reeto Chatterjee
1b704a869d Add recursive removal of packages 2018-03-23 23:45:46 +00:00
morganamilo
7768fab978
Supress pacman error printing
add22f5957 added error checks to all the
passToPacman commands. This makes `yay -Q nonexistantpackage` return
non 0 as it should. Annoyingly it also made yay print `exit status = n`
which is the error string from passToPacman calls. This error doesn't
add much and is quite annoying, expecially when calling pacman commands
like `-Q` or `-Si` where yay should be kind of 'hidden' and print just
like pacman does.

Now set the error string to "" for pacman commands and don't print an
error if it == "" (avoids empty line printed).

Also behave more like pacman when using `yay -Qu`.
2018-03-23 19:56:28 +00:00
morganamilo
1e01eafb43
Separate gendb from install 2018-03-22 18:23:20 +00:00
morganamilo
7fd2a74bd2
Lint 2018-03-22 16:39:27 +00:00
morganamilo
7655bd9c62
Add main.go 2018-03-22 16:38:21 +00:00
morganamilo
1864ec3083
Respect --color
`--color auto` is the same as `--color always` until a suitable method
for auto has been decided.
2018-03-21 05:42:19 +00:00
morganamilo
add22f5957
Extend aur support for -Qu
-Qu now has AUR support, it functions identically to `-Pu` and may replace
it in the futre.

Aditionally the pacman options `-n` and `-m` are also supported to
filter out native and non native packages. Other flags are not supported
currently.

Using any other `-Q` will fallback to Pacman.
2018-03-21 05:03:22 +00:00
Sergio Correia
9f62663888
Minor cleanups to keep the linter happy
* Unexported:
  - QuestionCallback
  - SliceToStringSet

* Unreachable return in parser.go

* Unneded else in dependencies.go

* Punctuation in error message in install.go
2018-03-19 11:39:47 -04:00
Sergio Correia
32f8396eca
Add --gpg' and --gpgflags` flags
`--gpg' is the GnuPG binary, while `--gpgflags' are extra
arguments to be passed to  GnuPG.

Also Update man page and usage regarding GnuPG options.
2018-03-17 19:15:29 -04:00
morganamilo
c091460d8c
Use a question callback for ignorepkg
The callback is set to allways silently say yes, When passing to pacman
for the intall pacman will then ask the question giving the user
a chance to answer.
2018-03-16 00:18:13 +00:00
morganamilo
ca4dac0685
Update doc for --rebuild 2018-03-14 15:02:24 +00:00
morganamilo
18af700053
Add --rebuild flag
Similar to the --redownload flag, when specifed targets will be rebuilt
even if an up to date version is cached. --rebuildall can be used to
ensure uninstalled dependencies are rebuilt as well.

Additionally, unlike --redownload there is also --rebuildtree. This
causes a rebuild and reinstall of a package and all of it's dependencies
recursivley. This is designed for when a libary updae, breaks an
installed AUR package due to a partial upgrade. polybar is a common
example

--rebuild allows you to easily skip the cache and rebuild against a newer
libary version. --rebuildtree is a more nuclear option where you can
rebuild the whole dependency tree.
2018-03-14 15:01:20 +00:00
Morgana
f9d4d9bafb
Merge pull request #235 from Morganamilo/fix#228
Add support for db/name
2018-03-13 17:14:22 +00:00
morganamilo
74196306fa
Respect --ignore and --ignoregroup flags
And enable version colouring on repo ignore and devel ignore
2018-03-12 23:46:23 +00:00
morganamilo
2bd4cdc590
Pass yay -Sl to pacman 2018-03-11 23:34:09 +00:00
morganamilo
5446f5d0a4
Add support for db/name
Adds the ability to pick which database to install a package from. This
is extended to also support for AUR packages. For example `extra/git`
and `aur/yay` should both work`. When not explicitly requesting
a database repo packages will be choosen over the AUR.

This features extends to yogurt mode, listings where a package shows up
in multiple database/the AUR is now handled.

The aur does not have a real pacman databse like core, extra ect. But
can be accessed as if was one with `aur/name`. Using Yay with a pacman
repository named "aur" is undefined.
2018-03-11 21:32:36 +00:00
Jguer
803d957282 Fix typos
Signed-off-by: Jguer <me@jguer.space>
2018-03-11 21:19:19 +00:00
morganamilo
d03890a3c4
Remove unneeded functions 2018-03-10 03:04:54 +00:00