Commit Graph

1603 Commits

Author SHA1 Message Date
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
morganamilo
fae0c506cc
Support db/name for groups 2018-03-16 01:14:34 +00:00
Morgana
b4ba01c928
Merge pull request #249 from Morganamilo/fix#245
Use a question callback for ignorepkg
2018-03-16 01:04:41 +00:00
Jguer
2b40ff47f7 Update vendored repositories
Signed-off-by: Jguer <me@jguer.space>
2018-03-16 00:39:49 +00:00
morganamilo
c091460d8c
Use a question callback for ignorepkg
The callback is set to allways silently say yes, When passing to pacman
for the intall pacman will then ask the question giving the user
a chance to answer.
2018-03-16 00:18:13 +00:00
morganamilo
69a86c6a78
Check versioned deps during the dep fetching process
Check versioned deps such as `foo>1` `foo=2` `foo<3`
2018-03-15 17:05:17 +00:00
morganamilo
47bb527a1b
Change getNameFromDep to allow getting the dep too 2018-03-15 14:23:12 +00:00
J Guerreiro
e0b8c92433
Merge pull request #243 from Morganamilo/rebuild2
Add --rebuild flag
2018-03-15 09:40:37 +00:00
morganamilo
ca4dac0685
Update doc for --rebuild 2018-03-14 15:02:24 +00:00
morganamilo
18af700053
Add --rebuild flag
Similar to the --redownload flag, when specifed targets will be rebuilt
even if an up to date version is cached. --rebuildall can be used to
ensure uninstalled dependencies are rebuilt as well.

Additionally, unlike --redownload there is also --rebuildtree. This
causes a rebuild and reinstall of a package and all of it's dependencies
recursivley. This is designed for when a libary updae, breaks an
installed AUR package due to a partial upgrade. polybar is a common
example

--rebuild allows you to easily skip the cache and rebuild against a newer
libary version. --rebuildtree is a more nuclear option where you can
rebuild the whole dependency tree.
2018-03-14 15:01:20 +00:00
Morgana
4c601c362b
Merge pull request #244 from Morganamilo/fix#241
Error when installing AUR packages as root
2018-03-14 13:08:33 +00:00
morganamilo
de29fc1b0f
Error when installing AUR packages as root 2018-03-14 13:08:04 +00:00
Morgana
345cc5475b
Merge pull request #242 from Morganamilo/dbname
Improve db/name system and add support for -Si
2018-03-13 23:59:51 +00:00
morganamilo
62e244db0f
Improve db/name system and add support for -Si 2018-03-13 21:38:10 +00:00
Morgana
b7eae565fd
Merge pull request #225 from Morganamilo/develspeedup
Use goroutinuies for devel updates
2018-03-13 17:19:24 +00:00
morganamilo
1d2b07fa84
Use channels over WaitGroup in needsUpdate()
Using a WaitGroup forced the code to wait for every goroutine to finish.
Using channels allows us to exit early if any of a packages sources need
an update. No point in waiting for the other requests to finish if we
know there is an update.
2018-03-13 17:18:46 +00:00
morganamilo
57a8048cb8
Use goroutinuies for devel updates
The update process was already partly parallel: repo, aur and devel
updates where each given their own goroutine.

This gives two further layers of parallelization. Firstly the
`needsUpdate()` function is now run in parallel for each package checked.
One package may have many vcs sources so `needsUpdate()` also checks all
of its sources in parallel.

This gives an aproxamte 3x speedup for `yay -Su --devel` timing from
when the command starts to when the number menu apears.

unfortunately git://bitbucket.org/volumesoffun/polyvox.git never
resolves on my machine for some reason so it always hits the 5 second
timout period.

It then moves on to http:/bitbucket.org/volumesoffun/polyvox.git/ which
does resolve as expected. I have not looked into it but I fear this
applies to all gitbucket repos. Luckly they are few and far between.
2018-03-13 17:18:46 +00:00
Morgana
f9d4d9bafb
Merge pull request #235 from Morganamilo/fix#228
Add support for db/name
2018-03-13 17:14:22 +00:00
Morgana
e6c47bee32
Merge pull request #179 from qrwteyrutiyoup/import-keys
Ask if yay should try to import missing PGP keys
2018-03-13 17:13:41 +00:00
Jguer
7f657bebe6 Update version number in makefile
Signed-off-by: Jguer <me@jguer.space>
2018-03-13 16:55:04 +00:00
Morgana
7de404b43d
Merge pull request #240 from Morganamilo/ignore
Respect --ignore and --ignoregroup flags
2018-03-12 23:47:18 +00:00
morganamilo
74196306fa
Respect --ignore and --ignoregroup flags
And enable version colouring on repo ignore and devel ignore
2018-03-12 23:46:23 +00:00
Sergio Correia
6f25da860c Ask if yay should try to import missing PGP keys
When building a package from the AUR for which there are missing keys,
yay will now prompt the user whether it should try to import such keys
using gpg:

[...]
:: Parsing SRCINFO (1/3): libc++ (libc++abi libc++)
:: Parsing SRCINFO (2/3): aurutils
:: Parsing SRCINFO (3/3): cower
==> GPG keys need importing:
        487EACC08557AD082088DABA1EB2638FF56C0C53, required by: cower
        11E521D646982372EB577A1F8F0871F202119294, required by: libc++ (libc++abi libc++)
        B6C8F98282B944E3B0D5C2530FC3042E345AD05D, required by: libc++ (libc++abi libc++)
        DBE7D3DD8C81D58D0A13D0E76BC26A17B9B7018A, required by: aurutils
==> Import?  [Y/n]
[...]

Default is to try to import the problematic keys ([Y/n]).
2018-03-12 17:11:31 -04:00
Jguer
e86e39a21d Add left padding to number menu
Signed-off-by: Jguer <me@jguer.space>
2018-03-12 21:01:53 +00:00