Commit Graph
1054 Commits
Author SHA1 Message Date
morganamilo cd21298355 Return srcinfos instead of using it as a parameter
Also, we do not do a pre and post pkgverbump pass anymore, so theres no
need to name it stale.
2018-08-18 17:05:12 +01:00
morganamilo 29fdf23f50 Remove unneeded code, consistent function names 2018-08-18 17:05:12 +01:00
morganamilo 43feb12c85 Merge handles.Aur and depOrder.Bases
depOrder.Aur contains the order in which AUR packages are to be
installed. While depOrder.bases contains the actual package data
organized by pkgbase.

deoOrder.AUR is kind of counterintuitive, as it only contains one
package from each package base.

For example if you were to install libc++{,abi,experimental},
depOrder.Aur would only contain one of those packages, which one
actually being quite random. depOrder.Bases[pkg.Pkgbase] will then be
looked up and everything under that slice would be installed.

This means that the only real use depOrder.Aur has, is to give the
pkgbase. So to cut out the middleman, lets merge .Aur and .Bases into
a single field.

Doing this has also heped to spot som subtle bugs:

Fix subtle split package errors.

The number menus now correctly list and respect (installed) for bases
that have atleast one of their packages installed.

Entering package names in number menus now always expects the pkgbase
name instead of the random package which happened to make it into .Aur.

--rebuild and --redownload correctly handles split packages.

formatPkgbase is also used more.
2018-08-18 17:05:12 +01:00
morganamilo 3dc350d3ac Simplify formatPkgBase
Only pass the packages belonging to the desired pkgbase. Before our
entire list of every pkgbase had to be passed, as well as an example
package from the base we are looking for.

This lets use use formatPkgBase easier in other places outside of
install.

Many of the functions in install could also be simplified in a similar
way, although that has not been done in this commit.
2018-08-15 20:11:19 +01:00
Anna 0e40d9a3f6 Merge pull request #614 from Morganamilo/refactormain
Refactor main
2018-08-15 20:11:00 +01:00
morganamilo 339a014614 Go back to using os.Getenv
Most programs seem to take an empty string as being the same as unset.
Even if they are technically different. This makes it easier to unset
variables via `VARIABLE= yay --foo`.
2018-08-12 05:09:56 +01:00
morganamilo febccaef3a Reorder main
Split functions out into smaller, more simple chunks. Ensure the correct
order of things.

Before, initConfig() would also create config.BuildDirbefore
the command line flags have been applied, so yay would
try to mkdir what was in the config, ignoring the flag.
2018-08-12 05:09:53 +01:00
morganamilo 2fac9c036f Refactor main.go to use one liner if err checks 2018-08-12 03:53:42 +01:00
morganamilo 1739a88be2 Refactor main function
Move cleanup and error checking to their own functions.
2018-08-12 03:53:42 +01:00
Anna 3f49316211 Merge pull request #633 from architekton/makefile-1
Remove redundant variable from makefile
2018-08-12 01:02:44 +01:00
Architekton 00f2cffc45 Remove redundant variable 2018-08-12 09:13:40 +10:00
Anna 25242398ac Merge pull request #613 from Morganamilo/parallel
Parallelize pkgbuild download and use MultiError
2018-08-09 22:54:11 +01:00
morganamilo 8cb800c6d1 Dont change std{out,err,in} in passToGit
This should be done in show instead
2018-08-09 19:44:56 +01:00
morganamilo 86ef1ec077 Include info in the lock 2018-08-09 17:01:29 +01:00
morganamilo 602f386b03 Loop over srcinfos instead of pkglist in gendb 2018-08-09 16:25:14 +01:00
morganamilo 2de67d1b24 Show message for timed out vcs checks 2018-08-09 16:25:14 +01:00
morganamilo 284c87afb6 Parallelize gendb 2018-08-09 16:25:14 +01:00
morganamilo 297bf31cdf Set GIT_TERMINAL_PROMPT=0 for clone and fetch 2018-08-09 16:25:14 +01:00
morganamilo 161bc1a17a Only check pkgbuild source protocols for vcs fetch
The current check involves checking the entire source url for the word
git. This can lead to yay asumming sources are git repos when they are
not.

For example: https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v2.0.0/LICENSE/

Makepkg seems to also only respect the protocols. For example:
	https://github.com/jguer/yay
will be fetched as a web page. git:// or git+https:// would be needed.
Although this does not seem to work the way yay assumes. You can not simply
+ togther a bunch of protocols. For exaplle: git+http+https:// will not
work, even though individually they do. git must also come first:
https+git:// will not work either.

Yay's method of spliting on each + is fine though, it works and I'm not
going to worry about broken packages that do https+git:// or similar.
2018-08-09 16:25:14 +01:00
morganamilo b3e647aee4 Use MultiError in other goroutines 2018-08-09 16:25:14 +01:00
morganamilo ff5ed12181 Parallelize pkgbuild download 2018-08-09 16:25:14 +01:00
morganamilo 8c2adaddb3 Hide git output 2018-08-09 16:25:14 +01:00
morganamilo 58240bdc3d Steal multierror from aurlib 2018-08-09 16:25:05 +01:00
Anna 6b25e60f8b Merge pull request #628 from Morganamilo/long=
Support = on long opts, not short opts
2018-08-08 16:23:11 +01:00
morganamilo 16d4a2ca88 Support = on long opts, not short opts 2018-08-08 16:21:33 +01:00
morganamilo 6b35f9ee2f Revert "Support -r=foo syntax"
This reverts commit 97006ade19. But keepts
the usr of k+1 and len(arg)-1
2018-08-08 16:20:38 +01:00
Anna a5ae757803 Merge pull request #615 from Morganamilo/fixargs
Add yay specific args, drop conflicting args
2018-08-05 21:52:16 +01:00
Anna e4df6a7dac Merge pull request #624 from Morganamilo/suaexample
Give an example of how to update only AUR packages
2018-08-05 15:37:29 +01:00
morganamilo 8f3f4b7b98 Give an example of how to update only AUR packages
I've seen `yay -Syua` given as an example all over the place. I'm not
sure if this is left over as a habbit from yaourt. In yay, -a restricts
the upgrade to AUR packages ONLY while I believe in yaourt it means to
also include the AUR.

The problem with `yay -Syua` is that you are doing a database refresh
and then only upgrading the AUR packages. Essencially:

pacman -Sy && update-aur

This is a recipy for partial upgrades.

Either upgrade everything `yay -Syu` or just the AUR `yay -Sua`.
2018-08-05 15:28:06 +01:00
morganamilo 5ef38c12bd Update usage and man page 2018-08-05 15:24:39 +01:00
morganamilo 2d6fe95903 Add yay specific args, drop conflicting args
Replace -P/--print with -P/--show
Replace --config with --currentconfig
2018-08-05 15:22:04 +01:00
Anna f62bd9245b Merge pull request #622 from ZenixTheHusky/Fix-621
Fix panic on invalid version strings
2018-08-05 15:15:42 +01:00
Peter Dyer 8d7ff22fed Fix panic on invalid version strings 2018-08-05 00:25:27 +01:00
Anna 6515a9bf04 Merge pull request #620 from Morganamilo/fixtimeupdate
Fix padding on time update
2018-08-04 14:25:10 +01:00
morganamilo de59b3911d Fix padding on time update 2018-08-04 14:24:42 +01:00
Anna 55ca78e74d Merge pull request #618 from Morganamilo/fix#546
Ensure AUR upgrades actually use the AUR
2018-08-03 23:27:03 +01:00
morganamilo 08ac9036ad Ensure AUR upgrades actually use the AUR
Yay's dependency resolving takes provides into account. When upgrading
AUR package 'foo', if a repo package provides 'foo' then yay would get
confused and pull in the package providing 'foo' instead of the AUR
package.

This commit ensures AUR upgrades always exclusively check the AUR.
2018-08-03 23:15:01 +01:00
Anna 6c5c6ab8f6 Merge pull request #612 from Morganamilo/accept---
Accept - and -- options
2018-08-02 16:52:58 +01:00
morganamilo db9ff186d6 Accept - and -- options 2018-08-02 16:51:33 +01:00
Anna a658851bbb Merge pull request #611 from Morganamilo/fix#609
Don't show .SRCINFO in diffs
2018-08-02 15:22:46 +01:00
morganamilo 4a254303c5 Don't show .SRCINFO in diffs 2018-08-02 15:21:01 +01:00
Anna 1839b473c2 Merge pull request #610 from Morganamilo/checkargs
Error on unkown args
2018-08-02 15:11:32 +01:00
morganamilo 97006ade19 Support -r=foo syntax 2018-08-02 14:50:56 +01:00
morganamilo 4e67c1e886 Simlify huge case statments
Instead of having true in every case, rely on the lack of fallthrough
causing the default not to trigger.

Moved handleConfig to parser.go
2018-08-02 14:50:56 +01:00
morganamilo d9823e4230 Error on unkown args
This is simply implemented by looking up against all the args. No
conflicts are checked such as using -Ss and -Si at the same time or using
-u with -D.
2018-08-02 14:50:51 +01:00
Anna 0746d2828b Merge pull request #601 from xyproto/minor
Only minor changes
2018-08-02 14:10:50 +01:00
Anna b848514b4b Merge pull request #585 from Morganamilo/usage
Support Usage in pacman.conf
2018-08-02 13:51:13 +01:00
morganamilo 06a45bad59 Don't return length with queryRepo 2018-07-31 22:01:14 +01:00
morganamilo dfe7738d6e Use pacman like text for ignorepkg and newerpkg
Now that we are using alpm to fetch packages it generates these mesages
and we can not control the format. So change out format to match.
2018-07-31 22:01:14 +01:00
morganamilo 42a74c41c5 Show alpm warnings 2018-07-31 22:00:41 +01:00