Commit Graph
76 Commits
Author SHA1 Message Date
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
J Guerreiro 69c8bf37c8 Merge pull request #106 from Jguer/print
Basic new Print option implementation
2018-01-21 08:05:02 +09:00
Jguer 9d55882ce2 Added statistics to new interface. Removed old. 2018-01-21 03:39:53 +09:00
Jguer 42889821d3 New print option, added new completion syntax, fixed fish completion 2018-01-21 02:48:40 +09:00
morganamilo 3275f8d8ac New install algorithm
I have replaced the old install and dependancy algorithms with a new
design that attemps to be more pacaur like. Mostly in minimizing user
input. Ask every thing first then do everything with no need for more
user input.

It is not yet fully complete but is finished enough so that it works,
should not fail in most cases and provides a base for more contributors
to help address the existing problems.

The new install chain is as follows:
	Source info about the provided targets
	Fetch a list of all dependancies needed to install targets
		I put alot of effort into fetching the dependancy tree
		while making the least amount of aur requests as
		possible. I'm actually very happy with how it turned out
		and yay wil now resolve dependancies noticably faster
		than pacaur when there are many aur dependancies.
	Install repo targets by passing to pacman
	Print dependancy tree and ask to confirm
	Ask to clean build if directory already exists
	Download all pkgbuilds
	Ask to edit all pkgbuilds
	Ask to continue with the install
	Download the sources for each packagebuild
	Build and install every package
		using -s to get repo deps and -i to install
	Ask to remove make dependancies

There are still a lot of things that need to be done for a fully working
system. Here are the problems I found with this system, either new or
existing:
	Formating
		I am not so good at formatting myself, I thought best to
		leave it until last so I could get feedback on how it
		should look and help implementing it.
	Dependancy tree
		The dependancy tree is usually correct although I have
		noticed times where it doesnt detect all the
		dependancies that it should. I have only noticed this
		when there are circular dependancies so i think this
		might be the cause. It's not a big deal currently
		because makepkg -i installed repo deps for us which
		handles the repo deps for us and will get the correct
		ones. So yay might not list all the dependancies. but
		they will get installed so I consider this a visual bug.
		I have yet to see any circular dependancies in the AUR
		so I can not say what will happend but I#m guessing that
		it will break.
	Versioned packages/dependencies
		Targets and dependancies with version constriants such
		as 'linux>=4.1' will not be checked on the aur side of
		things but will be checked on the repo side.
	Ignorepkg/Ignoregroup
		Currently I do not handle this in any way but it
		shouldn't be too hard to implement.
	Conflict checking
		This is not currently implemented either
	Split Paclages
		Split packages are not Handles properly. If we only
		specify one package so install from a split package
		makepkg -i ends up installing them all anyway. If we
		specify more than one (n) package it will actually build the
		package base n times and reinstall every split package
		n times.
	Makepkg
		To get things working I decided to keep using the
		makepkg -i method. I plan to eventually replace this
		with a pacman -U based method. This should allow passing
		args such as --dbpath and --config to aur packages
		aswell as help solve some problems such as the split
		packages.
	Clean build
		I plan to improve the clean build choice to be a little
		more smart and instead of check if the directory exists,
		check if the package is already build and if so skip the
		build all together.
2018-01-20 10:00:12 +00:00
J Guerreiro 479e2f0ce0 Merge pull request #97 from samosaara/master
Support for ranges when selecting packages
2018-01-18 21:02:35 +09:00
morganamilo 4da65a6a22 Fix error when no vsc_config exists 2018-01-14 20:26:30 +00:00
Samuel Henrique Oliveira da Silva 12641befac Keeping up with master
- Minor linting fixes.
2018-01-14 17:17:15 -02:00
Samuel Henrique Oliveira da Silva d737c99c81 Excluding from installation
#ItWoksOnMyMachine
2018-01-14 16:53:37 -02:00
Samuel Henrique Oliveira da Silva 0301eb0440 Negation for upgrading 2018-01-14 15:48:16 -02:00
Jguer 62af87bb0f Merged argument parsing system 2018-01-15 02:12:51 +09:00
Samuel Henrique Oliveira da Silva 6d2dcad091 Replicates the range functionally to upgrade 2018-01-14 14:04:15 -02:00
Samuel Henrique Oliveira da Silva 29cd864bbe Support for ranges when selecting packages
- Also, minor formatting to cmd.go
2018-01-14 13:15:32 -02:00
morganamilo a3df41368b Merge branch 'master' into fix#62 2018-01-07 21:59:39 +00:00
morganamilo 40a881927c Add missing --bottomup option 2018-01-06 23:28:07 +00:00
morganamilo 142cb25f95 Fix deps not being passed to pacman properly 2018-01-05 22:15:12 +00:00
morganamilo c0fc086a07 Pass command line arguments to alpmConf before init
This allows us to use command line options such as '--root' and '-b' when
performing operations that use out alom handle.

Sadly this does not apply to passToMakepkg which will ignore options
such as '--root' and because we pass '-i' to makepkg it installs for us
using the default options.

Currently I have not planned a solution for this but one which I thought
of but not looked into is. Always call makepkg without arguments (except
from '--noconfirm' and others which might still be needed) and manage
the dependancies and post install outselves.

Another option might be to use makepkg's $PACMAN enviroment variable and
redirect the pacman calls to yay. Although I am unsure about both
stratergys they are just my current thoughts.

Also while editing the flow of cmd.go, I managed to refactor away all
os.Exit calls apart from the very last so it should be more clear as to
where the program exits.
2018-01-04 22:48:54 +00:00