Commit graph

92 commits

Author SHA1 Message Date
morganamilo 2bb8070213
Add flags for all missing config options
With this The user should never have to manually edit the yay config
file. All options can be set directly through yay using
`yay --<option> <value> --save`
2018-03-08 14:56:53 +00:00
morganamilo 15409ad4e5
Add doc for --mflags 2018-03-07 23:36:09 +00:00
morganamilo cee0d74643
Add --mflags option to pass args to makepkg 2018-03-07 23:18:00 +00:00
morganamilo dec395753c
Remove accidental debug string 2018-03-07 22:58:13 +00:00
morganamilo 5a7654909d
Add doc for --save 2018-03-07 22:37:44 +00:00
morganamilo 33b76045e7
Add --save option
Before setting options such as --topdown would be saved to the config
file automaticly when used. Now this is no longer done by default and
isntead the --save flag must be passed for this to happen.

If --save is passed the config is now saved as soon as the argument
parsing is finished apposed to before where it was saved when yay exits.
This means that config changes will now apply if the user does a ^C
before yay finishes.
2018-03-07 22:34:45 +00:00
Morgana a7be7a839d
Merge pull request #208 from Morganamilo/redownload
Add support to skip pkgbuild downloads.
2018-03-07 21:56:18 +00:00
morganamilo a6cab60888
Add --redownloadall option and fix manpage descs 2018-03-07 21:32:55 +00:00
morganamilo 9b4264f346
Set default config in the correct place 2018-03-07 16:26:15 +00:00
morganamilo 74ef0beaed
Fix error when cacheHome does not exist
And refactor initYay out into smaller parts
2018-03-07 05:27:54 +00:00
morganamilo 1d3a87bd70
Move ~/.config/yay_vcs.json to ~/.cache/vcs.json
And refactor the file paths to constants in config.go
2018-03-06 17:43:57 +00:00
morganamilo d5fc1e0de5
Update docs for --redownload and --noredownload 2018-03-06 15:17:55 +00:00
morganamilo f66349696e
Add support to skip pkgbuild downloads.
If a pkgbuild is already in cache and matches the version on
the aur skip the download.

The version we check comes from the .SRCINFO file on disk which is never
updated. (updates through pkgver() edit the pkgbuild but do not effect
the .SRCINFO). Therefore if the the version of the .SRCINFO matches the
AUR's version there must not be  an update.

In the case of the on disk version being newer than the AUR version we
can assume user interaction and they probably do not want it overwitten
so in that case also skip the download.
2018-03-06 04:08:37 +00:00
morganamilo 80c59a74cc
Use git ls-remote to track devel updates
Use the command `git ls-remote <url> <branch>` to track devel updates
rather than relying on the GitHub API.

This allows devel update to work for every git based source and
elimantes the rate limiting from GitHub.

The yay_vcs.json format has changed to better support packages which
multiple vcs sources and to track the protocols each source uses. And
track the branch that each source tracks in it's fragment.
2018-03-05 23:05:13 +00:00
morganamilo 55bfd619dc
Improve printing
Add ( and ) to "installed" to match groups and out of date
Show popularity as well as voted in yogurt mode
Show download and install size in yogurt mode
Remove printing of white and black
Fix incorrect message on number menu
Yellow is now almost never used
Use `v` instead of `r` when printing version
show when a page was marked out of date on search and info
2018-03-02 20:32:33 +00:00
morganamilo ed2c231a72
Refactor printing
Drop the Fb suffix for printing colours
Seperate bold, fb and bg printing into individual functions
2018-03-02 04:39:16 +00:00
J Guerreiro 35599cdccf
Merge pull request #193 from Morganamilo/updatemanpage
Update manpage and usage
2018-03-01 09:47:49 +00:00
morganamilo 8e7af3e186
Update manpage and usage
Reword a lot of manpage and usage options.

Remove the `-Yg` and `-Y --getpkgbuild` options from documentation and
code as they have moved to `-G` and `--getpgkbuild`.

Update the version in the man page. Because our version is based on our
commit number added a `+` after the version number to indicated that
this is the version the manpage was written at but it also applies to
newer versions.

Added missing `-c --complete` and `-f --fish` options to the manpage.
But left them out of usage.

Added myself to the authors section. I do feel a bit bad about adding
myself and only myself but I thought it was not a good idea to add 20
names and fill up the page. There's currently no rules on who should be
added and not really a huge need for them right now. I guess we can just
add more people when we deem they belong there whatever that criteria
is.
2018-03-01 02:09:24 +00:00
morganamilo 111a7f73dc
Hide pacman output when setting install reason
Stderr is shown if Pacman returns non 0.
2018-02-28 17:41:42 +00:00
Morgana 9c4b4d73f9
Merge pull request #183 from Morganamilo/fix#88
Save the VSC info when install finishes.
2018-02-27 19:08:01 +00:00
morganamilo 8fb83f3e70
Save the VSC info when install finishes.
Save the VSC Info as soon as the package install finishes. This should
ensure the VSC db does not end up in an incorrect state if an install
fails or is cancelled by the user.

This also adds better support for split packages. When one or more
packages are installed from the same base each individual package is
added to the db not just the base. This allows us to track individual
updates from the same base so that if one package gets updated we don't
assume all packages in the base are updated.
2018-02-27 17:14:40 +00:00
Daniel Martí 73d6f9b1ab all: remove unused code
And simplify some code too.
2018-02-27 10:16:53 +00:00
morganamilo 04a9830e0b
Fix tests 2018-02-27 03:41:39 +00:00
morganamilo 716d775d5f
Improve formatting
Ignorepkg also colours version differences like the upgrade menu
Tweaked formatting when asking for users to eneter number
2018-02-27 02:02:33 +00:00
morganamilo 2856a7276c
Refactoring and improving insall process
This commit mostly focuses on merging the install() and upgradePkgs()
functions to be more integrated. Instead of both making their own aur
queries they now both combine theyre needes into one query. This gives
us a speed up and allows us to easily print orphands, misising and out
of date in one clean block.
2018-02-27 02:02:33 +00:00
morganamilo 3fb77b1d72
Use aurInfo() for -G 2018-02-27 02:02:33 +00:00
J Guerreiro f000afaa42
Merge pull request #168 from seankhliao/master
add config.String() to pretty print default config in valid json
2018-02-27 01:44:45 +00:00
morganamilo 85a99198c3
Fix handling of -- in parser 2018-02-20 17:03:50 +00:00
Sean Liao 56db82ed10 fix stray tab 2018-02-20 23:12:07 +08:00
Sean Liao d12685debc separate printing default and current config 2018-02-20 23:08:29 +08:00
Sean Liao 57773b6c2d add config.String() to pretty print default config in valid json 2018-02-20 22:24:48 +08:00
morganamilo 4298e77632
Fix passing incorrect flags during yay -Sy[s,i] 2018-02-17 23:00:18 +00:00
morganamilo d04ca15228
Hang on first sudo
Currently sudoloop is run in parallel with the rest of the code this
causes the first sudo prompt to ask for a password while the code
continues running.

Instead hang on the first sudo, giving the chance for the user to enter
a password then continue the loop in the background.
2018-02-16 18:12:22 +00:00
Jguer 6913770b4d Merge branch 'lessmakepkg' of https://github.com/Morganamilo/yay into Morganamilo-lessmakepkg 2018-02-16 17:16:56 +00:00
Jguer 9f734bdf8d References #147. Sudo loop is off by default 2018-02-16 13:15:05 +00:00
morganamilo e1f3cb6682
run cleanafter after finishing the install process
Cleanafter is now run right at the very end of install instead of after
each makepkg command.
2018-02-15 21:41:49 +00:00
Brian Allred 510bd7e172 Fix extended info (-Sii) not passing to pacman 2018-02-14 10:10:07 -06:00
Jguer 78742a9429
fix #147 with a sudo loop 2018-02-13 18:20:15 +00:00
J Guerreiro 3bc33c1b64
Revert "Respect --noconfirm in config" 2018-02-09 20:27:34 +00:00
J Guerreiro 20128f4776
Merge pull request #142 from Morganamilo/fix#122
Respect --noconfirm in config
2018-02-09 09:52:00 +00:00
morganamilo 519014af3d
Respect --noconfirm in config 2018-02-09 03:34:29 +00:00
Kaushal M 22d10f287a
Re-add support for PacmanBin 2018-02-08 15:04:47 +05:30
Jguer c0901ff86b Fixes --noconfirm. Changes default build location to ~/.cache/yay/ 2018-02-07 12:06:56 +00:00
J Guerreiro d2db36ac7a
Merge pull request #129 from simon04/typos
Fix typos in code/comments
2018-02-05 09:00:41 +00:00
Jonas Platte 9c524a4ece s/PKGBuild/PKGBUILD 2018-02-01 10:13:32 +01:00
Simon Legner 750ae0254c Fix typos in code/comments 2018-01-31 22:07:02 +01:00
morganamilo 0f0100b4d0
Fixes #122 properly
Options such as --devel are now striped from the parser before handling
the command but the option is still processed so that config.devel would
be true.

Also changed `changedConfig` to a global in config.go
2018-01-31 17:44:15 +00:00
Jguer fa479c2670 Updates fish completions
Updates man page and usage
Changes -G to -Yg but doesn't remove previous option yet.
2018-01-31 19:27:11 +09:00
Jguer f466fc74f5
Ports more text to new colour format. 2018-01-26 11:30:33 +00:00
Jguer a4d0ef108f
Fixes #75. Needs sudo. Prints number of updates and update list. 2018-01-25 20:39:26 +00:00