Commit graph

957 commits

Author SHA1 Message Date
morganamilo e28f4f3431
Refactor continueTask()
The main reason behind this is for future localisation. yes and no can
be set to the localized equivalent and it should just work.

This Refactor also changes the function in ways which make it much less
confusing.

The param is no longer reversed and changed to a boolean. Before you had
to pass in Yy to get a default of no and vice versa.

The function now retuens false for no and true for yes. Before it would
return true if the default option was choosen.
2018-07-23 13:49:45 +01:00
Anna a3564ec3a7
Merge pull request #577 from AladW/patch-1
yay.8: typo in --nopgpfetch flag
2018-07-22 00:09:06 +01:00
Alad Wenter a5a9afd681 yay.8: fix typo in --nopgpfetch 2018-07-22 01:04:22 +02:00
Anna 17c310156c
Merge pull request #576 from Morganamilo/cleanup
Remove unused code, fix typo for -g flag
2018-07-21 18:15:11 +01:00
morganamilo 253d162b5b
Remove unused code, fix typo for -g flag
As it turns out, the times you need root also tend to be the time you
need to manipulate the database. So the needWait() function can be
removed and repllaced by needRoot()
2018-07-21 17:40:32 +01:00
J Guerreiro f9972da763
Wait for db.lck to become available before starting a db operation (#573)
* Wait for db.lck to become available before starting a db operation

* Fix err!=nil issues and avoid spamming users

* Remove redundant cases

* Remove return
2018-07-21 16:18:19 +01:00
Anna 1d463d1e3f
Merge pull request #575 from Morganamilo/fix#574
Add --{no,ask}removemake
2018-07-21 14:26:52 +01:00
morganamilo ec48698f35
Add --{no,ask}removemake 2018-07-21 14:20:00 +01:00
Anna 0e5cd51910
Merge pull request #571 from Morganamilo/abort-conflict
Abort ealy when there's conflicts with --noconfirm
2018-07-20 20:53:25 +01:00
morganamilo 1d17940ce9
Abort ealy when there's conflicts with --noconfirm
When using --nouseask, manual intervention is needed to resolve conflicts.
When also useing --noconfirm the install will always fail. So abort
early, before trying to install any AUR packages.
2018-07-20 20:42:47 +01:00
Anna 1bc8d5ef34
Merge pull request #570 from Morganamilo/fix-devel
Fix devel updates
2018-07-20 19:02:48 +01:00
morganamilo b5b6928803
Fix devel updates
Commit 474cc56f8d refactored the
getCommit() function to use the standard passToGit() and capture()
functions.

Unlike every other external call, here we use .Wait() and kill the
command after 5 seconds. This was missed and ended up breaking the
function.

So instead don't use capture but the manual .Wait() call. passToGit() is
still used.
2018-07-20 18:59:12 +01:00
Anna 23e0064382
Merge pull request #569 from AlexWayfer/unify_output_with_pacman
Make output more similar to `pacman`s
2018-07-19 23:02:59 +01:00
Alexander Popov 900dfd1851
Make output more similar to pacmans
Before:

* Empty line after `Searching AUR`
* `There is` starts with capital letter without space before

```
> yay --combinedupgrade -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Searching databases for updates...
:: Searching AUR for updates...

:: Starting full system upgrade...
 there is nothing to do

> yay --nocombinedupgrade -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Searching databases for updates...
:: Searching AUR for updates...

There is nothing to do
```

After:

```
> yay --combinedupgrade -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Searching databases for updates...
:: Searching AUR for updates...
:: Starting full system upgrade...
 there is nothing to do

> yay --nocombinedupgrade -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Searching databases for updates...
:: Searching AUR for updates...
 there is nothing to do
```
2018-07-20 00:36:06 +03:00
Anna dd891aba8c
Merge pull request #568 from Morganamilo/diffs-as-diffs
Show tar diffs as diffs instead of editing
2018-07-19 22:31:05 +01:00
morganamilo d1146de6d5
Show tar diffs as diffs instead of editing
When looking at diffs of packages downloaded as tar achives actually
show a diff instead of opening the files in the ediror. This diff
is against /var/empty so it is not that useful. In realiy this is an
excuse to move the srcinfo parsing back down to after the git merge.

Viewing the build files in the editor requires the .srcinfos to be
parsed to know what .install files are used. Now viewing diffs does not
need the srcinfos so they can be moved to after we git merge.

Before now the srcinfo would have been of the previous version. This is
not much of a problem because we don't really use the srcinfo for much.
Checking the arch and pgpkeys which never really change.

Recently libc++ changed their pgp keys and yay missed that because it
parsed the old srcinfo without the new keys.

Viewing a proper diff for tars can be tossed on the todo by doing
something along the lines of:
	mv pkg{,.old}
	diff pkg{,.old}
	rm -rf pkg.old

But I doubt there are many people out there using tar so it's not much
of an issue.
2018-07-19 22:19:24 +01:00
Anna 298afac0e0
Merge pull request #567 from Morganamilo/refactor-install
Refactor install
2018-07-19 21:32:29 +01:00
morganamilo 1d443c0d40
Merge GIT_TERMINAL_PROMPT with the current env 2018-07-19 20:52:30 +01:00
morganamilo 0196a47ad2
Refactor combinedupgrade code 2018-07-19 20:43:03 +01:00
morganamilo 257653047b
Move sudoloop code to exec.go 2018-07-19 18:58:04 +01:00
morganamilo 474cc56f8d
Use passToGit() in getCommit() 2018-07-19 18:51:57 +01:00
morganamilo 8427dc3804
Move passToFoo() functions to their own file 2018-07-19 18:48:46 +01:00
morganamilo 473a2de225
Refactor pssToFoo() functions
Previously each call to an external command had two functions.
PassToFoo() and PassToFooCapture(). These functions are always similar
and end up with duplicated code.

So instead have the passToFoo() functions return the cmd itself and
create small helper functions show() and capture() which will run the
command and either forward it to std{out,err,in} or capture the output

Also the saveVCSInfo() function which was called after every makepkg
call is now only called after the pacman -U succeeds.
2018-07-19 18:37:28 +01:00
Anna 6e41ef882b
Merge pull request #566 from Morganamilo/fix#564
Fixup FAQ and manpage typo
2018-07-19 17:52:53 +01:00
morganamilo 526cec70ed
Fix typo in man page 2018-07-19 17:50:30 +01:00
morganamilo 6313c14382
Add editing pkgbuild dependencies to the FAQ 2018-07-19 17:50:16 +01:00
morganamilo a576dbc1fd
Mention --save in --combinedupgrade FAQ 2018-07-19 17:31:22 +01:00
Anna c10716ab1a
Merge pull request #559 from Morganamilo/install
Show .install files with pkgbuilds when editing
2018-07-19 17:23:03 +01:00
morganamilo d4d36397fe
Show .install files with pkgbuilds when editing 2018-07-18 09:24:57 +01:00
Anna ac19616bc3
Merge pull request #558 from Morganamilo/typo
Fix typo
2018-07-17 22:57:05 +01:00
morganamilo 9602d4bc79
Fix typo 2018-07-17 22:36:01 +01:00
Anna a1b5684a2f
Merge pull request #550 from Morganamilo/go-srcinfo2
Update readme, depreciate -Pu and -Pn
2018-07-17 22:10:31 +01:00
morganamilo 46d09f8ab7
Fixup FAQ Section 2018-07-17 22:07:20 +01:00
morganamilo 686e1baaf4
Update readme, depreciate -Pu and -Pn 2018-07-17 22:01:52 +01:00
Ema Panz 6b30e17b67
Update README.md 2018-07-17 18:08:55 +01:00
Anna fdcc233cbe
Merge pull request #552 from Morganamilo/fix#551
Fix group installs for --nocombinedupgrade
2018-07-16 17:04:46 +01:00
morganamilo f3635cd14d
Fix group installs for --nocombinedupgrade 2018-07-16 17:03:39 +01:00
Anna d6b862357d Replace gopkgbuild with go-srcinfo (#528)
* Prefer vercmp over gopkgbuild

* Replace gopkgbuild with go-srcinfo
2018-07-16 15:28:18 +01:00
J Guerreiro b1fb1b9656
Add flagged out of date FAQ closes #545 2018-07-16 12:06:29 +01:00
Jguer f8e84658c0
Major version update 2018-07-16 11:35:25 +01:00
Anna fafaa26d7b
Merge pull request #544 from Morganamilo/nothing
Show nothing to do message for nocombinedupgrade
2018-07-12 11:14:15 +01:00
morganamilo 2437937372
Show nothing to do message for nocombinedupgrade 2018-07-12 11:12:12 +01:00
Anna 595d362ee6
Merge pull request #537 from Morganamilo/fixagain
Fix -Y and remove debug messages
2018-07-06 15:26:09 +01:00
morganamilo dcaf1e5595
Fix -Y and remove debug messages 2018-07-06 15:24:03 +01:00
J Guerreiro a06c21d875
Merge pull request #535 from Morganamilo/fix#534
Properley seprate aur and repo targets.
2018-07-06 00:39:09 +01:00
morganamilo 8dd0d97ae0
Properley seprate aur and repo targets.
When not doing combined upgrade the repo targets need to be extracted
for the early pacman call.
2018-07-05 22:20:18 +01:00
Anna 18bbc983c9
Merge pull request #532 from Morganamilo/support-singed
Support source URLs that contain ? again
2018-07-05 01:59:06 +01:00
morganamilo d627df7288
Support source URLs that contain ? again
Turns out the query part of a source url can be dirrectly after the URL
or after the # fragment. So the branch needs to be stripped too.
2018-07-05 01:58:34 +01:00
Anna 1e0ad92dd1
Merge pull request #531 from Morganamilo/support-singed
Support source URLs that contain ?
2018-07-04 15:34:39 +01:00
morganamilo b46b111c07
Support source URLs that contain ?
Since pacman 5.1 makepkg supports  ? to signal some stuffg in
a similar way to #. Cut this out so URLs with ? no longer fail.
2018-07-04 15:29:54 +01:00