std{out,err} all passed to the call so errors should print just as
before, the only difference is now yay will not abort after an error
occurs. We always provide a confirmation dialog after viewing diffs so
this should be safe.
As raised in #994, diff display was not proper when interrupting during
download or diff review.
This commit introduce:
- Add a ref in the git tree named "YAY_DIFF_REVIEW" which is set to the last
diff reviewed by the user.
- Change the function displaying diff to user to make proper use of this
new ref. If the ref does not exist in the git tree, it will display the
diff from origin to HEAD@{upstream}.
- Add a function updating the YAY_DIFF_REVIEW after it has been reviewed
by user. It uses the `toDiff` list in the `install` function.
- Add utils function related to handling this change in download.go.
This change only consider diff reviewed to update the YAY_DIFF_REVIEW ref.
If a user does not enable review, the ref will not be updated and the
user will be prompted for review when he enables diff review.
Signed-off-by: Loic Reyreaud <reyreaud.loic@gmail.com>
After building an AUR package don't install it right away. Instead queue
it for install.
Then when a package comes along that does not have all of its
dependencies satisfied, install the queued packages before builting.
This allows a standard AUR update to be done with one transaction, while
building AUR packages with long dependency chains will work as normal.
This feature is behind the `--batchinstall` flag.
merge both dependency resolving parts into depSolver. The name was
choosen simply to not colide with the current code.
depSolver works but it not implemented in the install process and is
missing conflict checking.
Yay first calls 'makepkg --nobuild -fC' to update the pkver. Later on we
call 'makepkg -cf --noectract --noprepare --holdver' to actually build
the package.
Inbetween these two calls we keep the already extracted
sources to save time on the reextract and duplicated call to prepare
(pkgbuilds should not require user input but things such as linux-ck do
and calling prepare twice will actually cause them to promt twice)
We also have two checks. First we see if the package is already
installed and up to date (--needed) and secondly we check if the
package is already built.
If any of these conditions are met we skip building the package. This
leaves a dangling src/ directory as 'makepkg -c' was never ran.
Now if these conditions are met tell makepkg to cleanup and exit.
Before --needed was left purerly to pacman. The problem with this is
that if a package is not in the cache, it will end up being build just
for pacman to skip over the install.
Now Yay will handle this and skip the build and install if --needed is
used. The inital clone and pkgver bumb is still donw.
There was a possibly that getIncompatible could be broken when working
with split packages. After looking into it, this does not seem to be the
case, as long as we only work with pkgbases.
arch may be overriden inside of a package function. The global arch
array may be 'any' but package_foo could say arch=('x86_64'). If you
were running arm then should yay warn about this?
I have decided the answer is no. This is because makepkg doesn't care.
It would seem makepkg only checks the global arch array. This leads me
to believe that the global array should contain a the required arch.
Therefore the correct way to do the former example would be to declare
the global arch as 'x86_64' and then override package_bar with 'any'.
So all that we should do is properly use formatPkgbase to list all the
packages under the base.