pacman/scripts
Eli Schwartz 22e6daa794 makepkg: correctly handle missing download clients
This was broken in commit 882e707e40,
which changed 'plain()' messages to go to stdout, which was then
captured as the download client in question: cmdline=("Aborting...").

The result was a very confusing error message e.g.

/usr/share/makepkg/source/file.sh: line 72: $'\E[1m': command not found

or with makepkg --nocolor:

/usr/share/makepkg/source/file.sh: line 72: Aborting...: command not found

The problem here is that we checked to see if an asynchronous subshell,
in our case <(...), failed, by checking if its captured stdout is
non-empty. Which is terrible, and also a limitation of old bash. But
bash 4.4 can use wait $! to retrieve the return value of an asynchronous
subshell. Now we target that as our minimum, we can sanely handle errors
in such functions.

Losing error messages on stdout by capturing them in a variable instead
of printing them, continues to be a problem, but this will be fixed
systematically in a later commit.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
(cherry picked from commit 381e113755)
2020-06-18 02:05:38 -07:00
..
completion Remove --force from completion 2019-10-23 22:06:54 +10:00
libmakepkg makepkg: correctly handle missing download clients 2020-06-18 02:05:38 -07:00
library scripts/library: fix typo in README 2018-12-10 11:12:27 +10:00
po Pull latest translations from Transifex 2019-11-01 10:54:12 +10:00
.gitignore libmakepkg: install pkg-config file 2019-05-08 12:46:33 +10:00
libmakepkg.pc.in libmakepkg: install pkg-config file 2019-05-08 12:46:33 +10:00
Makefile.am makepkg: do not count hard links multiple times when calculating pkg size 2019-10-30 10:03:46 +10:00
makepkg-template.pl.in build-aux/update-copyright 2019 2020 2020-06-18 01:45:38 -07:00
makepkg.sh.in makepkg: deterministic PKGINFO libprovides for multiple library versions 2020-06-18 02:02:28 -07:00
meson.build libmakepkg: install pkg-config file 2019-05-08 12:46:33 +10:00
pacman-db-upgrade.sh.in build-aux/update-copyright 2019 2020 2020-06-18 01:45:38 -07:00
pacman-key.sh.in build-aux/update-copyright 2019 2020 2020-06-18 01:45:38 -07:00
repo-add.sh.in build-aux/update-copyright 2019 2020 2020-06-18 01:45:38 -07:00
wrapper.sh.in build-aux/update-copyright 2019 2020 2020-06-18 01:45:38 -07:00