Commit graph

834 commits

Author SHA1 Message Date
morganamilo
bad0af1a8a
Fix typos 2018-06-04 20:12:26 +01:00
morganamilo
6c22d5987c
Update man page 2018-06-04 20:01:14 +01:00
morganamilo
63509365c1
Add less not always paging to the faq 2018-06-04 19:22:16 +01:00
morganamilo
a71784684c
Add new options to usage 2018-06-04 19:16:43 +01:00
J Guerreiro
dda7a0ca08
Merge pull request #456 from Morganamilo/slice
Use slices for targets instead of stringsets
2018-06-02 22:43:41 +01:00
Anna
68ca822fc7
Merge pull request #455 from Morganamilo/fixyogurt
Don't show provider menu for targets during -Y
2018-06-02 19:15:25 +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
5f2933271a
Use slices for targets instead of stringsets
The order of targets does somewhat matter. For example doing something
like 'pacman -S db1/foo db2/foo' should cause the second package to be
skipped.

The order of targets also effects in which order they are resolved. This
should make errors more reproducable if any ever occur.
2018-06-02 17:56:09 +01:00
Anna
bd162cc317
Merge pull request #454 from Morganamilo/makepkg
Stop prepare running twice
2018-06-02 15:23:51 +01:00
morganamilo
942e389d85
Stop prepare running twice
Prepare ends up getting ran twice every time we install a package,
theres not problems with doing so apart from a little inefficiency.

Previously the install flow would be like this:
	downlod sources + verify
	prepare + pkgver bump
	full build (prepare included)

Now on the last point pass no extract to use the srcdir from the
previous command and pass noprepare and holdver because we allready did
these steps previously.
2018-06-02 14:16:00 +01:00
Anna
3eb89aac7f
Merge pull request #453 from Morganamilo/fix#451
Disable git terminal prompt
2018-06-02 13:58:48 +01:00
morganamilo
c4d319268c
Disable git terminal prompt
This allows requests that want authentication to fail instantly and
silently. Rather than delying the program and printing to the terminal.
2018-06-02 13:52:18 +01:00
Anna
5b6c4101f8
Merge pull request #447 from Morganamilo/fix#131
Implement diffs for pkgbuild viewing.
2018-06-01 19:11:52 +01:00
morganamilo
f20fbd25c1
Implement diffs for pkgbuild viewing.
diff viewing can be toggled via --[no]showdiffs. When enabled diffs will
be shown for packages between the current HEAD and upstream's HEAD.
Packages downloaded via tarballs will be shown in full using the editor

git diff is used to show diffs. Therefore the pager for diffs can be
set via the PAGER and GIT_PAGER enviroment variables.
2018-06-01 18:11:13 +01:00
Anna
33f067fe9e
Merge pull request #449 from Morganamilo/fix#448
Support db prefix and --repo/--aur on -G
2018-06-01 05:08:06 +01:00
morganamilo
14b66043a2
Support db prefix and --repo/--aur on -G 2018-06-01 05:06:58 +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
477d3b937e
Fix mixing of db prefix with --repo/--aur flags 2018-06-01 03:26:22 +01:00
Anna
af91c2f1b8
Merge pull request #446 from Morganamilo/fix#439
Add config option for pgp key fetching
2018-05-31 16:39:48 +01:00
morganamilo
682040319e
Add config option for pgp key fetching 2018-05-31 16:36:36 +01:00
Anna
796a84bd1a
Merge pull request #445 from Morganamilo/repoflags
Support --aur and --repo flags
2018-05-31 16:30:23 +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
Jguer
b5715de4fd
Update vendored aur 2018-05-31 09:23:20 +01:00
Anna
f186bd1de3
Merge pull request #444 from Morganamilo/fix#434
Support any PKGDEST and PKGEXT
2018-05-31 05:44:39 +01:00
morganamilo
9afd671905
Support any PKGDEST and PKGEXT
Pacman 5.1 removes the symlink to the current directory for built
packages. This causes Yay to break for people who have set an external
PKGDEST.

Pacman 5.1 also brings an improved --packagelist option. This makes
it much simpler to find where packages will be placed. Hence this fix
also simplifies the code.

Yay has an -Sc option to clear it's cache. If using an external PKGDEST
this is now mostly useful for clearing out old pkgbuilds and sources.
paccache should be used for cleaning build packages.
2018-05-31 05:42:03 +01:00
J Guerreiro
c36bfc1237
Merge pull request #401 from Morganamilo/deps3
Dependency system rewrite
2018-05-30 17:16:23 +01:00
J Guerreiro
3381a2119e
Merge pull request #442 from Morganamilo/fix#441
Tweak -Si output
2018-05-30 16:12:50 +01:00
morganamilo
7ba552e91f
Tweak -Si output
Always show popularity as a decimal
Always show out of date value
2018-05-30 16:01:48 +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
943b2f931a
Tweak missing packages text 2018-05-30 04:06:29 +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
7a1e2de6cd
Simplfy upgrade skipping 2018-05-30 03:21:17 +01:00
morganamilo
e76f978d63
Only show warnings for pkgs that are being updated
The previous warning system would show warnings recursivley for all
packages being resolved. While I like this, other have complained at it
being overly verbose.

Either way the main purpose of this is to allow warnings to be printed
before the upgrade menu shows. This is mostly just to get a usable
warning system.

This may change if a better solution is found.
2018-05-29 23:39:02 +01:00
morganamilo
b140e66f6a
Improve --asdeps and --asexplicit handling
Correctly handle --asdeps and --asexplicit for both repo packages and
aur packages.
2018-05-29 22:35:58 +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
6df8c58e00
Re add isDevelName() 2018-05-29 13:15:45 +01:00
morganamilo
6e990e4dc5
Don't conflict with pkgs that are in the depPool
When upgrading multiple packages that are already installed we should
not conflict with already installed packages that are in the depPool.

This is because the version in the depTree is going to replace the
currently installed version of the package and may have different
conflicts.

If there is a conflict between stuff in the depPool these should be
handled by the innerConflicts check anyway.
2018-05-29 13:15:45 +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
6423fb55b5
Fix build order being reversed 2018-05-29 13:13:33 +01:00
morganamilo
7b558ba47c
Fix check for missing dependencies
We dont check the dependencies of things already installed becuase,
well, they're already installed. But we should check the dependencies of
targets even if they are installed because they get reinstalled.
2018-05-29 13:13:33 +01:00
morganamilo
8c77ad061e
Clean up unused code 2018-05-29 13:13:33 +01:00
morganamilo
671f836ec5
Calculate makeDeps properly
MakeOnly would be set to true when moving from normal deps to make deps
But would incorrectly stay set to true when moving to the deps of the
following packages.

depOrder.Aur now only holds one package from each base like
depCatagories does.
2018-05-29 13:13:33 +01:00
morganamilo
c019a2cc02
Remove old dependency code 2018-05-29 13:13:33 +01:00
morganamilo
2e7a022b7c
Use new dependency code in install()
The old depTree and depCatagories has been changed to depPool and
depOrder in the install function.
2018-05-29 13:13:33 +01:00
morganamilo
b585cec123
Add Basses to depOrder
This should act exaclty like depCatagories.Basses
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
Jguer
d442af9dcc
Fix #435. Update vendor to include SIGLEVEL overflow fix 2018-05-29 11:36:45 +01:00
J Guerreiro
cc2322f492 Update README.md to include temporary notice of manual intervention 2018-05-29 00:41:55 +01:00