[aur-general] mksrcinfo bug: PKGBUILD stdout appears in mksrcinfo

Sam S. smls75 at gmail.com
Sat Aug 15 12:43:11 UTC 2015

On Sat, Aug 15, 2015 at 12:53 PM, Bruno Pagani <bruno.pagani at ens-lyon.org>
> Maybe that’s a stupid question, but why do you need printing something to
stdout in a
> PKGBUILD, especially outside of any function ?

The only good reason I can think of, is to tell users that (and how) they
need to provide a source archive manually.

But there's a better way to do that. Just add something like this to the

DLAGENTS+=('file::/usr/bin/sh -c echo\ '"$(printf "%q" "Could not find %u.
" \
           "Download it from $url, and symlink it to $(pwd)/.")"'\;\ exit\


Besides not suffering from the problem that Ido describes, this approach
has the advantage that users can install a custom file:// dlagent in
/etc/makepkg.conf if they want, for example one that automatically searches
for such sources in ~/downloads and symlinks them into the PKGBUILD dir if

          'file::/usr/bin/sh -c find\ \$HOME/downloads\ -name\ \$(echo\ %u\
\|\ cut\ -c\ 7-)\ -exec\ ln\ -s\ \\\{\\\}\ %o\ \\\;\ -quit' )

More information about the aur-general mailing list