Commit Graph

695 Commits

Author SHA1 Message Date
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
morganamilo
ef5fda0264
Hanlde double args of mixed short and long types
99% of the time if a user wants to pas an argument twice they would do
`-cc` or `--clean --clean`. Still doing `-c --clean` is still a valid
thing to do. This commits allows getArg() to this properly.
2018-04-17 13:53:37 +01:00
J Guerreiro
dccfcb6c69
Merge pull request #357 from AlexWayfer/add_tests_for_upgrade_highlighting
Add more tests for upgrade highlighting
2018-04-17 13:11:43 +01:00
Alexander Popov
6689198623
Add more tests for upgrade highlighting
They are based on `_`, which faced in the `google-musicmanager`
2018-04-17 10:25:21 +03:00
Morgana
a79562677d
Merge pull request #356 from Morganamilo/fix#353
Use filepath.Join() for adding paths together
2018-04-17 02:07:45 +01:00
morganamilo
110a905a0c
Use filepath.Join() for adding paths together 2018-04-17 01:32:31 +01:00
Jguer
bab050a354 Update const var
Signed-off-by: Jguer <me@jguer.space>
2018-04-16 14:17:14 +01:00
Jguer
cfd244f377 Add missing entries
Signed-off-by: Jguer <me@jguer.space>
2018-04-16 14:13:11 +01:00
Jguer
0216b116f4 Fix typos and lint
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
Morgana
55fe22c430
Merge pull request #352 from Morganamilo/fix#351
Dont bump pkgver() while downloading sources
2018-04-16 00:21:17 +01:00
morganamilo
694c74f5b4
Remove no longer needed function and lint 2018-04-16 00:18:01 +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
J Guerreiro
aa649d9b41
Merge pull request #349 from Morganamilo/fix#331
Lots of formatting tweaks
2018-04-12 15:40:22 +01:00
Morgana
0229ec0861
Merge pull request #350 from Morganamilo/fix#346
Support entering package name during askCleanEdit
2018-04-12 13:17:40 +01:00
morganamilo
ac571d314a
Support entering package name during askCleanEdit 2018-04-12 13:01:54 +01:00
morganamilo
c75bfe4947
Ask if user wants to contunue right after askedit 2018-04-11 20:23:43 +01:00
morganamilo
06406d7cee
More formatting tweaks
Ensure aurWarnings will always be printed out in one block
use '->' for printing aur warnings and ignored upgrades
use '->' for conflict printing
use '->' for key importing
Say PGP keys not GPG keys
Add back green for input prompts
Use 4 spcaces over \t
2018-04-11 20:23:43 +01:00
morganamilo
191b5ebe47
Make colours more consistent and less ott
Use yellow ==> for warning messages
Keep white text no matter the colour of ==>
Use cyan for pkgname printing like it already is in places
2018-04-11 20:23:43 +01:00
Jguer
0aae012eb5 Update Readme
Signed-off-by: Jguer <me@jguer.space>
2018-04-11 11:34:31 +01:00
Morgana
53a31c2437
Merge pull request #348 from Morganamilo/fix#347
Don't mark repo upgrades as deps during sysupgrade
2018-04-11 05:36:52 +01:00
morganamilo
906748ebde
Don't mark repo upgrades as deps during sysupgrade
Before `yay -Syu` called `pacman -Sy <pkgs to upgrade>`
We then later switched to it calling `pacman -Syu` this lead to yay
seeing no targets to when it was upgrading a bunch of packages it
assumed they must be deps. Correct this by adding repo packages to the
targets list.

Also ensure we dont mark packages as dependencies if they are already
installed. For example we install `foo` which requires `bar>5` but we
only have `bar=4` installed. In this case installing `foo` will pull bar
in as a dependency but it should not be marked as such because it
already exists.
2018-04-11 05:35:44 +01:00
Morgana
960109d513
Merge pull request #345 from Morganamilo/fix#343
Support flags when using the editor
2018-04-09 21:09:47 +01:00
morganamilo
60b111545a
Tweak editor input loop
New line before output
Use less bold
Highlight editor and visual variables
Use cyan for highlighting
Use arrow prefix
Use loop instead of goto
2018-04-09 21:04:57 +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
Morgana
2aaf5f8694
Merge pull request #329 from AlexWayfer/improve_versions_output
Highlight diff between old and new versions better
2018-04-09 16:15:40 +01:00
Jguer
0026701888 Update README for release
Signed-off-by: Jguer <me@jguer.space>
2018-04-09 12:33:57 +01:00
Jguer
bc9439b26e Merge branch 'Morganamilo-fix#337' 2018-04-09 12:24:34 +01:00
Jguer
0507bebee9 Merge branch 'fix#337' of https://github.com/Morganamilo/yay into Morganamilo-fix#337 2018-04-09 12:22:37 +01:00
J Guerreiro
0c7ae56301
Merge pull request #341 from Jguer/fish
add fish completions
2018-04-09 12:21:43 +01:00
Jguer
adbc47a4f9 add fish completions
Signed-off-by: Jguer <me@jguer.space>
2018-04-09 12:20:51 +01:00
J Guerreiro
6ad06696d9
Merge pull request #339 from Morganamilo/doc2
Document fcf0ee34d1
2018-04-09 12:08:47 +01:00
J Guerreiro
a057050e33
Merge pull request #340 from Morganamilo/completion
Update bash and zsh completion
2018-04-09 12:08:11 +01:00
morganamilo
6f223786ef
Update bash and zsh completion 2018-04-08 21:49:27 +01:00
Alexander Popov
f7a636573b
Add tests for upgrade (getVersionDiff function) 2018-04-08 22:46:33 +03:00
Alexander Popov
38b5680619
Fix make test (gofmt threw "Files need to be linted") 2018-04-08 22:46:33 +03:00
Alexander Popov
1e4c029a2e
Add common stylize function for reduce code repeation
Also check for input length, don't create empty stylized strings.
2018-04-08 22:46:28 +03:00
morganamilo
e05d86b31b
Document fcf0ee34d1 2018-04-08 15:49:56 +01:00
Alexander Popov
46cffa6ba6
Highlight diff between old and new versions better
Split by dots, pluses, dashes, tilds, etc., not only `Version` and `Pkgrel`.

Don't make new version different bold.

Inspired by [`pikaur`](https://github.com/actionless/pikaur).
2018-04-08 02:16:31 +03:00
morganamilo
9ba9b03396
Show pkgver during -Ss when package is out of date 2018-04-07 23:02:10 +01:00
Reeto Chatterjee
992c27e82e
Merge branch 'master' into master 2018-04-07 16:42:56 +00:00
J Guerreiro
ec71a5bb87
Merge pull request #332 from Morganamilo/doc
Update usage and man page for new flags
2018-04-07 00:12:54 +01:00
morganamilo
855c6c841c
Update usage and man page for new flags 2018-04-05 19:25:17 +01:00
Morgana
6eb3dccf06
Merge pull request #330 from Morganamilo/fixnm
Fix number menu
2018-04-05 14:17:03 +01:00
morganamilo
072e8e6189
Fix number menu 2018-04-05 14:10:30 +01:00
Morgana
922a591b64
Merge pull request #328 from Morganamilo/flags
Repect --answer* flags when --noconfirm is set
2018-04-04 22:40:04 +01:00
morganamilo
a33414b723
Repect --answer* flags when --noconfirm is set
This means that menus are now printed in noconfirm mode, I don't see
this as a problem because Pacman still prints its questions during
noconfirm.

When the user has edited pkgbuilds Yay will prompt if they want to
continue with the intall. This prompt is also enabled during noconfirm
to ensure the user is happy with the pkgbuilds.
2018-04-04 22:22:33 +01:00
Morgana
b0445028e2
Merge pull request #327 from Morganamilo/flags
Add flags for sort order and automating menu input
2018-04-04 21:59:48 +01:00