Commit graph

29 commits

Author SHA1 Message Date
jguer d003e96e07
fix(ci): fix env propagation
fix broken ci artifact download
2020-06-13 19:49:57 +02:00
jguer 9fccdcb30f
fix(ci): implement stricter linting settings 2020-05-02 16:17:20 +02:00
morganamilo cff358d5d6
Move intrange to its own module
types is pretty generic as a module name, this should be split into
seperate modules.
2019-10-16 23:18:04 +01:00
morganamilo f2579f26a3
Move stringset to its own module
types is pretty generic as a module name, this should be split into
seperate modules.
2019-10-16 23:18:04 +01:00
J Guerreiro 7b710b796b
Merge pull request #1056 from Morganamilo/searchby
Add --searchby
2019-10-13 23:38:28 +01:00
Jguer a591b33262
Add errguards throughout the code to enable golangci-lint 2019-10-13 20:56:27 +01:00
morganamilo ab2101ab49
Add --searchby
Allow using the RPC's &by= field during -Ss
2019-10-10 17:43:22 +01:00
Jguer b01790f752
Moved StringSet definition to types package 2019-10-05 18:39:31 +01:00
morganamilo 125e716547
Hide provider menu with --noprovides
This feature was already implemented in
e71fb8617a but was accidently reverted.
2019-06-17 21:25:11 +01:00
morganamilo 112046853b
Use correct case on go-alpm import 2019-04-23 16:53:20 +01:00
morganamilo 895788e01b
Update go-alpm 2019-02-14 20:45:18 +00:00
morganamilo 5ce4a49687
Update go-alpm 2019-02-04 16:56:02 +00:00
morganamilo 4ab7814af1
Revert "Merge pull request #767 from Morganamilo/merge-dep-pool-order"
This reverts commit c2aeb4bc4e, reversing
changes made to 1f1cee7023.
2019-01-15 18:43:46 +00:00
morganamilo a83f8fb9e8
Remove depPool and depOrder code 2018-10-13 17:04:21 +01:00
morganamilo 5109fc6250
Move target code to dep.go 2018-10-10 22:13:00 +01:00
morganamilo 4fc6a1a711
Fix provider menu showing when it shouldn't
If the package is already installed, we need to check if it is in the
repos to see if it aplies to rebuild tree. Normally alpm will not prompt
us to select a provider if we already have one installed. An exception
comes up when we have a provider installed that is from the AUR. In this
case FindSatisfier() still asks us to select a provider.

Now make sure to never to never show the menu if the package exists in
the local repo.
2018-09-25 14:33:25 +01:00
morganamilo 5c7d6fa3be
Fix --rebuild logic 2018-09-04 20:03:27 +01:00
morganamilo bad0af1a8a
Fix typos 2018-06-04 20:12:26 +01:00
morganamilo bf562ee9a7
Don't show provider menu for targets during -Y
Doing `yay -S yay` I expect the provider menu to show, giving me the
choice between yay, yay-bin and yay-git

If I do `yay yay` I will then get a menu of all matching packages. upon
entering 2 for the package yay I would not expect a provider menu.
I have already choosen an exact package.

This commit disables the provider menu during yogurt mode. Only for
targets, the dependencies can still open provider menus.
2018-06-02 19:13:20 +01:00
morganamilo 444ccce925
Filter out invalid tatgets instead of ignoring them
Invalid targets that occur when combining aur/foo with --repo or db/foo
with --aur. Instead of ignoring them, filter them out and give a warning
as it happens.
2018-06-01 05:06:58 +01:00
morganamilo 0ae8fc2a06
Support --aur and --repo flags
These flags limit operations to only check the repos or only check the
AUR. These flags apply to -S, -Si and -Su.

-a may also be used as a short option for --aur. --repo has no short
option as -r is taken.
2018-05-31 16:25:49 +01:00
morganamilo 13754722fd
Fix group install
Using --asdeps with a group install does not work, this seems like
a rare use case so ignoring for now.
2018-05-30 04:41:59 +01:00
morganamilo 53227082a5
Skip provider searching for already installed pkgs
We do not offer a provider menu for already installed packages. For
example if you already have yay installed then yay -S yay will just
reinstall yay. No prompt will be given for yay-git or yay-bin.

Therefore it makes sense to disable provider searching for these
packages. Expecially because it is the slowest part of dependency
resolving and many already installed packages are going to be resolved
when using -u.
2018-05-30 03:35:12 +01:00
morganamilo c464af6b9b
Implement config option for provider searching 2018-05-29 17:40:35 +01:00
morganamilo 33d056e9ac
Split Targets to Targets and Explicit
Targets are used for tracking wether a package should be marked as
explicitly installed or as a dependency. This is not ideal because you
can have a target such as java-environment that resolves to a different
package.

Therefore Targets are now used only for the initial dependency resolving
and checking for missing dependencies. The Explicit set is now used to
mark what packages are explicit, seperate from the targets.
2018-05-29 16:47:43 +01:00
morganamilo d51205194e
Support skiping updates and showing warnings
The warnings were moved down to after the upgrade menu, mainly because
it is a lot easier to do this way, it may get moved back if it can be
done in a non hacky way,
2018-05-29 13:15:40 +01:00
morganamilo b76d085418
Improve provider menu
Sort the provider menu alphabetically. Always ensure direct matches show
up first. This ensures hitting enter for the default value will always
be the same package that the user/dependency requested if an exact match
exists.

If a package is already installed pick that instead of providing a menu.

Ensure duplicates do not show up in the menu.
2018-05-29 13:13:33 +01:00
morganamilo 8c77ad061e
Clean up unused code 2018-05-29 13:13:33 +01:00
morganamilo b2d3eb5c49
Add new dependency code to replace the old code
This is a rewrite of the dependency system, It aims to be cleaner
written, with a better idea of what is needed from the start, meaning
less new code being hacked on for things that were not thought about.
This version also aims to use as many small functions as possible, for
cleaner code and better testing.

Added dep.go:
    general dependency functions
Added depPool.go:
    Replacement of depTree, dependencies were never ordered so
    a tree did not really make sense. Instead the term pool
    makes more sense.
Added depOrder.go:
    Replacement of depCatagories, This simply orders the
    dependencies, dependencies are still catagorized as repo and AUR
    but I believe this to be a better name
Added depCheck.go:
    Replaces conflicts.go and also contains the missing dependency
    code

This version is mostly the same as the old version with a few
improvments:
    Missing packages will print the full dependency tree
    Versioned dependency checking errors should be fixed
    Make depends should be calculated properly
    Experimental AUR provide searcher

This code has been added along side the old code for testing and is not
currently used by the install process. Once the install process is moved
to use this code, the old code will be removed.
2018-05-29 13:13:27 +01:00