Commit Graph

576 Commits

Author SHA1 Message Date
morganamilo
074ea4465a
Make aurInfo return a pointer 2018-03-22 18:11:00 +00:00
Morgana
f1fd4a1203
Merge pull request #276 from Morganamilo/fixagain
Fix nothing to do if upgrading only repo packages
2018-03-22 17:32:41 +00:00
morganamilo
2ea16836eb
Fix nothing to do if upgrading only repo packages
Dont display clean/edit menu when upgrading only repo packages.
2018-03-22 17:12:33 +00:00
J Guerreiro
59b74e1253
Merge pull request #273 from Morganamilo/util
Add util.go and main.go
2018-03-22 17:49:13 +01:00
morganamilo
7fd2a74bd2
Lint 2018-03-22 16:39:27 +00:00
morganamilo
7655bd9c62
Add main.go 2018-03-22 16:38:21 +00:00
morganamilo
0c0cd4f883
Add utils.go 2018-03-22 16:38:21 +00:00
J Guerreiro
415659d1cd
Merge pull request #272 from Jguer/directory-change
Update version for close release
2018-03-22 17:18:17 +01:00
Jguer
82124c1b46 Update version for close release
Signed-off-by: Jguer <me@jguer.space>
2018-03-22 17:02:40 +01:00
Morgana
ac02498177
Merge pull request #269 from Morganamilo/conflicts
More conflict checking
2018-03-22 15:27:39 +00:00
Morgana
b28a35ccf5
Merge pull request #271 from Morganamilo/fix#270
Don't mark targets as dependencies
2018-03-22 15:23:20 +00:00
morganamilo
a1a05bced4
Don't mark targets as dependencies 2018-03-22 15:22:05 +00:00
morganamilo
d5015b3fe8
Add breif comments for functions in conflicts.go 2018-03-22 14:38:37 +00:00
Morgana
dbe0ace129
Merge pull request #265 from Morganamilo/refactor
Refactor and improve the upgrade menu
2018-03-22 14:05:47 +00:00
morganamilo
4a8ec944bf
Move conflict checking to its own file 2018-03-22 07:19:25 +00:00
morganamilo
804bd45f2c
More conflict checking
This commit extends the conflict checking a lot, it adds support for:
	Conflicting with provides as well as actual package names
	Reverse conflicts
	Inner conflicts

Both normal conflicts and inner conflicts are run in parallel.
Messages are now printing when checking conflicts.

This also fixes packages sometimes being listed as conflicting with
themselves.

The inner conflict is a little verbose and could be toned down a little
but I am insure exactly how to tone it down.
2018-03-22 07:18:58 +00:00
morganamilo
98ea801004
Pass -Su to pacman during sysupgrade
Previosly during `yay -Su` Yay would pass
`pacman -S <packages that need upgrade>` to pacman.

Instead pass `pacman -Su --ignore <number menu choices>`

This allows yay to handle replaces and package downgrades `-Suu`
2018-03-22 07:13:18 +00:00
morganamilo
bb211fdbf7
Don't show package in aur/ if it is also in devel/ 2018-03-22 07:13:18 +00:00
morganamilo
624851b80b
More sorting for upgrade menu
Sort accending instead of decending
Sort by package name as well as repo name
Sort AUR packages as well as repo packages
2018-03-22 07:13:18 +00:00
morganamilo
b5c0cb7a11
Simplify upList()
Before the goroutines in upList() were layed out like:
	upLists()
	|- - - 	upRepo()
	|- - - 	pAur()
		| - - -	upDevel()

Simplified by moving upDevel() from upAur() to upList():
	upList()
	|- - - 	upRepo()
	|- - - 	upAur()
	|- - - 	upDevel()

With the simpler layout it was easy to then remove some un need channel
useage entirely and use WaitGroups in other places.

Now if any of the three inner functions error, upList() will return
a combined error instead of just printing the error and carrying on.
2018-03-22 07:13:18 +00:00
Morgana
bb35f202b8
Merge pull request #264 from Morganamilo/fix#262
Move repo install to after numbermenus
2018-03-21 21:51:05 +00:00
Morgana
09e2171b1a
Merge pull request #267 from Morganamilo/colour
Respect --color
2018-03-21 05:42:45 +00:00
morganamilo
1864ec3083
Respect --color
`--color auto` is the same as `--color always` until a suitable method
for auto has been decided.
2018-03-21 05:42:19 +00:00
Morgana
8003ca7d44
Merge pull request #266 from Morganamilo/fix#263
Extend aur support for -Qu
2018-03-21 05:04:14 +00:00
morganamilo
add22f5957
Extend aur support for -Qu
-Qu now has AUR support, it functions identically to `-Pu` and may replace
it in the futre.

Aditionally the pacman options `-n` and `-m` are also supported to
filter out native and non native packages. Other flags are not supported
currently.

Using any other `-Q` will fallback to Pacman.
2018-03-21 05:03:22 +00:00
morganamilo
885614ef45
Move repo install to after numbermenus 2018-03-21 00:45:26 +00:00
Morgana
44f2da3211
Merge pull request #251 from Morganamilo/provides
Implement the provider question  and imatate pacman
2018-03-20 15:57:44 +00:00
morganamilo
3ceda128fc
Dont use FindSatisfier() in packageSlices()
Now that install() no longer relies on packageSlices() we can drop the
use of FindSatisfier() so that only direct package names are understood,
this is how pacman -Si works.

This also fixes a small issue where `yay -Si mysql` would fail. This is
because two repo packages provide `mysql`. This causes Yay to not bother
checking the AUR even though there is a package in the AUR called `mysql`
2018-03-20 15:56:13 +00:00
morganamilo
df11b85e54
Implement the provider question and imitate pacman
Implement the alpm question QuestionSelectProvider and print the select
menu in a way similar to how pacman does it.
2018-03-20 15:56:13 +00:00
Jguer
66eac83c23 Update vendor dependencies
Signed-off-by: Jguer <me@jguer.space>
2018-03-20 08:55:08 +01:00
Morgana
81bb5a1990
Merge pull request #260 from Morganamilo/fix#191
Handle pkgbuilds with an unsupported arch
2018-03-19 20:04:22 +00:00
morganamilo
42fdd01d42
Update keys_tests.go 2018-03-19 20:00:13 +00:00
morganamilo
4bcd3a6297
Handle pkgbuilds with an unsupported arch
When pkgbuilds are built by makepkg, if the pkgbuild's arch=() array
does not include the current carch set in makepkg.conf, makepkg will
fail to build the package.

Now, Yay detects if a pkgbuild does not support the arch set in
pacman.conf Yay will ask the user about this and ask them if they want
to build anyway, passing `--ignorearch` to makepkg.`

Note that Yay will check against the arch set in pacman.conf which is
what pacman uses to only allow installs of package of that arch. makepkg
will still use carch set in makepkg.conf to build packages. These two
values are expected to be the same otherwise Yay will fail.

The on disk .srcinfo is needed for this as the user should be asked pre
source download. This and pgp checking both use the on disk .srcinfo so
it is no longer a one off. Store the 'stale' srcinfos so they can be
accesed by both functions.
2018-03-19 19:24:51 +00:00
Morgana
1a15511dc1
Merge pull request #259 from qrwteyrutiyoup/cleanup
Cleanup
2018-03-19 17:40:53 +00:00
Sergio Correia
9f62663888
Minor cleanups to keep the linter happy
* Unexported:
  - QuestionCallback
  - SliceToStringSet

* Unreachable return in parser.go

* Unneded else in dependencies.go

* Punctuation in error message in install.go
2018-03-19 11:39:47 -04:00
Sergio Correia
a5b5cc38ee
Remove unused functions after #227
After #227, the following functions became unused, so remove them:
- askCleanBuilds
- askEditPkgBuilds
2018-03-19 11:28:46 -04:00
Morgana
65d5f89dc5
Merge pull request #258 from Morganamilo/arch
Be more exact when looking for cached packages
2018-03-19 11:13:52 +00:00
morganamilo
e09752c23d
Be more exact when looking for cached packages
Instead of looking for `pkgname-pkgver-pkgrel*`
Look for `pkgname-pkgver-pkgrel-arch.pkg*` using the arch set in goalpm.
2018-03-19 10:53:40 +00:00
Morgana
aedbe04b04
Merge pull request #256 from qrwteyrutiyoup/keys
Updates on PGP keys
2018-03-18 22:08:53 +00:00
Sergio Correia
affff21be8
Update completion files to include gpg and gpgflags 2018-03-17 19:15:52 -04:00
Sergio Correia
32f8396eca
Add --gpg' and --gpgflags` flags
`--gpg' is the GnuPG binary, while `--gpgflags' are extra
arguments to be passed to  GnuPG.

Also Update man page and usage regarding GnuPG options.
2018-03-17 19:15:29 -04:00
Sergio Correia
03d3753a39
Fix key-related tests after #254
Merge #254 fixed the updating of vsc packages, but did not update
key-related tests. This commit updates such tests so that they keep
working.
2018-03-17 16:47:45 -04:00
Morgana
73d2a0504d
Merge pull request #255 from Morganamilo/fixa
Fix and improve version checking
2018-03-17 02:20:30 +00:00
morganamilo
7eea7eb9b5
Fix and improve version checking
Fix typo where adding to has instead of depStrings

Error correcly when missing packages

Also handle cases where a package is provided multiple times. If one
package provies `foo=1` and another provides `foo=2` before the latter
would just overide the former version. Now both versions will be checked
against.
2018-03-17 02:09:17 +00:00
Morgana
4c4737d952
Merge pull request #247 from Morganamilo/versions
Check versioned deps during the dep fetching process
2018-03-17 00:40:43 +00:00
Morgana
f18d66e8ee
Merge pull request #254 from Morganamilo/pgp2
Fix updating of vsc packages
2018-03-17 00:23:44 +00:00
morganamilo
158b80c5bc
Fix updating of vsc packages
With the addition of pgp key checking in Yay, the srcinfo parsing was
moved to before the pkgver() bump, leading to outdated pkgbuild
information.

Srcinfo parsing must be done after the pkgver() bump
The pkgver() bump must be done after downloading sources
makepkg's PGP checking is done as the sources download
yays PGP importing requires the srcingo to be parsed

Quite the chicken and egg problem

It is possible to skip the integ checks after the sources download
then parse the srcinfo
do the yay PGP check
then run the integ checks

the problem here is that to generate the srcinfo `makepkg --printsrcingo` is ran
This causes the pkgbuild to be sourced which I am not comftable with
doing without the integ checks.

Instead we parse the on disk .SRRCINFO that downloads with the PKGBUILD
just for the PGP checking. Later on we parse a fresh srcinfo straight
from `makepkg --printsrcingo`. This is a little bit less efficient but
more secure than the other option.
2018-03-17 00:10:38 +00:00
Morgana
7944c73b6c
Merge pull request #252 from Morganamilo/update
Update vendored repositories
2018-03-16 20:57:18 +00:00
morganamilo
12b79ae4aa
Update vendored repositories 2018-03-16 20:54:28 +00:00
Morgana
989096a46c
Merge pull request #250 from Morganamilo/fg
Support db/name for groups
2018-03-16 01:15:32 +00:00