Commit Graph

859 Commits

Author SHA1 Message Date
morganamilo
fcb8c35046
Pass to pacman when there's no AUR packages
Instead of doing all the AUR stuff just pass to pacman and return. No
need for any of Yay's stuff when there's no AUR involved.

Of couse everything before that still happens. Upgrade menu ect.
2018-06-11 00:41:39 +01:00
Anna
08af51892b
Merge pull request #480 from Morganamilo/git2
Rework editing and diff showing
2018-06-11 00:19:37 +01:00
morganamilo
8430c41be9
Rework editing and diff showing
Clean build needs to happen before downloading pkgbuilds so that they
can be deletd before downloading.

Editing and diff viewing needs to happen after downloading the
pkgbuilds.

Prevously we asked to clean and edit at the same time. Then clean,
download pkgbuilds and open the editor.

This poeses a problem for diff viewing and editing. It's likley that the
user will see the diff and use that to decide if they want to edit the
pkgbuild. Using the current method, the user will be asked to view diffs
and edit before actually seeing any diffs.

Instead split cleaning diff showing and editing to three seperate menus
in the following order:
	show clean menu
	clean
	download pkgbuilds
	show diff menu
	show diffs
	show edit menu
	edit pkgbuilds

Also each menu is seperatly enableable. By default only the diff menu is
shows. If the user wishes to clean build, edit pkgbuilds or disable
diffs then the user can use the --[no]{clean,diff,edit}menu flags. This
replaces the --[no]showdiffs flags.
2018-06-10 16:11:23 +01:00
Anna
91d3adc8e1
Merge pull request #478 from Morganamilo/git
Show diffs before merging
2018-06-10 16:10:08 +01:00
Anna
4d6c49b64a
Merge pull request #479 from reisub0/master
Fixed trivial typo
2018-06-10 09:41:13 +01:00
Govind KP
219e50e668
Fixed trivial typo
packags -> packages
2018-06-10 13:58:21 +05:30
morganamilo
00da26a3ce
Always show diffs for newly cloned packages
Newly cloned packages already start out at origin/master, so there is no
diff to show. Track if we cloned a package and if so make sure to show
the full diff
2018-06-10 03:41:25 +01:00
morganamilo
2b925aefa3
Lint 2018-06-10 03:21:08 +01:00
morganamilo
4f8b43cd60
Show diffs before merging
This is what 5775e3..43d2a6 has been leading up to. Git fetch will be
called on all pkgbuilds, then the user is offered a chance to view the
diffs. If they choose to continue, merging happens. This allows users to
abort the install after viewing diffs and still be able to see thoes
diffs again if they try to install later on.

This also makes the git stuff a little more modular which should help in
organzing diff showing + pkgbuild editing.
2018-06-10 03:21:08 +01:00
morganamilo
43d2a6601a
Split pkgbuild downloading and merging 2018-06-10 03:18:50 +01:00
morganamilo
73bd713217
Split hash fetching and pkgbuild downloading 2018-06-10 03:17:59 +01:00
morganamilo
1b8d9317e4
Split pkgbuild downloading and up to date checks 2018-06-10 03:17:28 +01:00
morganamilo
5775e3c0b7
Split git clone/pull and merge function 2018-06-10 03:17:23 +01:00
Anna
2c6cff36da
Merge pull request #475 from alanjjenkins/ajj/fix-failing-tests
Fix failing tests
2018-06-09 15:45:01 +01:00
Alan Jenkins
c3a94edd20 Fix failing tests
There were several calls to fmt.Errorf in setPaths where the returned error was not
being used. This was indicated by ```make test``` as shown here:

```
make test
gofmt -l *.go
go vet
./main.go:16: result of fmt.Errorf call not used
./main.go:21: result of fmt.Errorf call not used
./main.go:25: result of fmt.Errorf call not used
./main.go:30: result of fmt.Errorf call not used
./main.go:35: result of fmt.Errorf call not used
./main.go:39: result of fmt.Errorf call not used
make: *** [Makefile:43: test] Error 2
```

With these changes the tests now all pass with no errors.
2018-06-09 15:40:30 +01:00
Anna
218a5e6d6e
Merge pull request #468 from Morganamilo/fixver
Print true pkgver when skipping build
2018-06-05 14:49:58 +01:00
morganamilo
64ab60f4b4
Print true pkgver when skipping build 2018-06-05 14:49:18 +01:00
Anna
cf6068dbd3
Merge pull request #467 from Morganamilo/fix#466
Fix file paths
2018-06-05 14:19:04 +01:00
morganamilo
7fdb5c2007
Make sure enviroment paths are not empty 2018-06-05 14:17:07 +01:00
morganamilo
e5d7cce49c
Fix file paths 2018-06-05 14:14:49 +01:00
Anna
0f6effbdbb
Merge pull request #462 from Morganamilo/fix#460
Tweek config and cache dir initialization
2018-06-04 23:35:46 +01:00
morganamilo
3aea877ab9
Tweek config and cache dir initialization
Check if enviroment variables are set instead if they are empty strings.
Don't care if the dir exists just take the path at face value.
Error if $HOME and the respective $XDG.. variables are not set.
2018-06-04 23:31:50 +01:00
Anna
b56afaaee3
Merge pull request #461 from Morganamilo/repoaur
Support --aur/--repo for -Ss and -Y
2018-06-04 20:37:07 +01:00
morganamilo
ced35af515
Support --aur/--repo for -Ss and -Y 2018-06-04 20:36:10 +01:00
Anna
ab317e52fe
Merge pull request #459 from Morganamilo/doc2
Update docs
2018-06-04 20:14:30 +01:00
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