On 18/09/13 00:02, Xyne wrote:
Download the source files with an invocation of makepkg before capturing the output of makepkg -g. Without this, data printed to STDOUT by the downloader is included in the PKGBUILD. --- contrib/updpkgsums.sh.in | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/contrib/updpkgsums.sh.in b/contrib/updpkgsums.sh.in index ffea96b..760c414 100644 --- a/contrib/updpkgsums.sh.in +++ b/contrib/updpkgsums.sh.in @@ -72,6 +72,9 @@ if [[ ! -w . ]]; then fi
{ + # Download sources first to avoid downloader output in newsums array below. + makepkg --verifysource -dp "$buildfile" >/dev/null 2>&1 +
This does a lot more checks of the PKGBUILD that "makepkg -g" does. And will fail for a VCS package when the needed VCS software is in the makedepends array and not installed on the system. (makepkg -g does not download VCS sources, makepkg --verifysource does). Is the solution just to extract the checksum output first?
# Generate the new sums and try to unlink the file before writing stdin back # into it. This final precaution shouldn't fail based on the previous checks, # but it's better to be extra careful before unlinking files.