Commit Graph

81 Commits

Author SHA1 Message Date
morganamilo
a61eb0d568
Use no-progress when cloning packages
The output is annoying and takes up many lines. All AUR packages clone
extremley fast anyway, making the progress unneeded.
2018-07-28 16:15:01 +01:00
morganamilo
473a2de225
Refactor pssToFoo() functions
Previously each call to an external command had two functions.
PassToFoo() and PassToFooCapture(). These functions are always similar
and end up with duplicated code.

So instead have the passToFoo() functions return the cmd itself and
create small helper functions show() and capture() which will run the
command and either forward it to std{out,err,in} or capture the output

Also the saveVCSInfo() function which was called after every makepkg
call is now only called after the pacman -U succeeds.
2018-07-19 18:37:28 +01:00
morganamilo
00da26a3ce
Always show diffs for newly cloned packages
Newly cloned packages already start out at origin/master, so there is no
diff to show. Track if we cloned a package and if so make sure to show
the full diff
2018-06-10 03:41:25 +01:00
morganamilo
4f8b43cd60
Show diffs before merging
This is what 5775e3..43d2a6 has been leading up to. Git fetch will be
called on all pkgbuilds, then the user is offered a chance to view the
diffs. If they choose to continue, merging happens. This allows users to
abort the install after viewing diffs and still be able to see thoes
diffs again if they try to install later on.

This also makes the git stuff a little more modular which should help in
organzing diff showing + pkgbuild editing.
2018-06-10 03:21:08 +01:00
morganamilo
5775e3c0b7
Split git clone/pull and merge function 2018-06-10 03:17:23 +01:00
morganamilo
c4d319268c
Disable git terminal prompt
This allows requests that want authentication to fail instantly and
silently. Rather than delying the program and printing to the terminal.
2018-06-02 13:52:18 +01:00
Anna
5b6c4101f8
Merge pull request #447 from Morganamilo/fix#131
Implement diffs for pkgbuild viewing.
2018-06-01 19:11:52 +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
14b66043a2
Support db prefix and --repo/--aur on -G 2018-06-01 05:06:58 +01:00
Jguer
2b5c725a0c Fixes #430. Don't abort -G just error to signal not all was good
Signed-off-by: Jguer <me@jguer.space>
2018-05-28 13:45:11 +01:00
Jguer
70e5f43171 Quick fix to yay -G error code #430
Signed-off-by: Jguer <me@jguer.space>
2018-05-28 13:31:33 +01:00
Jguer
d15f899809 Fixes #417
Signed-off-by: Jguer <me@jguer.space>
2018-05-14 18:33:48 +01:00
morganamilo
38818757c8
Lint 2018-05-10 20:18:16 +01:00
morganamilo
ee75de0135
Add mised filepath.Join() calls 2018-05-03 01:47:24 +01:00
Jguer
d319576303 Use megacheck to lint project
Signed-off-by: Jguer <me@jguer.space>
2018-04-27 01:25:40 +01:00
Tom Swartz
1c9715dddf Fix typos 2018-04-23 13:06:56 -04:00
morganamilo
110a905a0c
Use filepath.Join() for adding paths together 2018-04-17 01:32:31 +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
694c74f5b4
Remove no longer needed function and lint 2018-04-16 00:18:01 +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
morganamilo
b58746d1ef
Fix -G for non split packages and support multilib
A while ago the url to download a pkgbuild was using pkg.Name(), it was
latter changed to pkg.Base() to support split packages. It seems that
pkg.Base() does not work for non split packages for some reason.

So instead try pkg.Base() and if it is empty default to pkg.Name().

Also add support for downloading from multilib
2018-03-11 23:23:24 +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
morganamilo
4ef282c54e
go fmt 2018-02-27 02:02:33 +00:00
morganamilo
3fb77b1d72
Use aurInfo() for -G 2018-02-27 02:02:33 +00:00
morganamilo
501e777aa0
Fix -G being unable to download split packages
this is a quick fix for now so it can be pushed out for the next
release. -G really should get the fancy split package printing that -S
now has `libc++ (libc++ libc++abi)`.
2018-02-22 21:11:41 +00:00
Jguer
ecc337c29f
Finishes porting text to new colour format. 2018-01-26 15:04:10 +00:00
Jguer
8fa7c4069e Resolves #57. Added Package ignoring to AUR. Handles made private. 2017-10-18 11:38:19 +09:00
jguer
226d0f89dd Flatten now compiles 2017-08-04 10:26:53 +01:00
Jguer
b4f4a42d50 Flattened architecture. Does not compile 2017-08-02 18:24:03 +01:00