diff options
author | Tilman Blumenbach | 2017-02-12 17:42:35 +0100 |
---|---|---|
committer | Tilman Blumenbach | 2017-02-12 17:42:35 +0100 |
commit | 5e5c4b1c77edd5fd9b2ac04ac6c0a54497d607ab (patch) | |
tree | e0fda5ecbb64253e81473b0a6aaf54dea27c6d41 | |
parent | 0f435fcd0c31b953d8a265829c9a90d920d67a8a (diff) | |
download | aur-5e5c4b1c77edd5fd9b2ac04ac6c0a54497d607ab.tar.gz |
pkgver() must not produce any superfluous output.
Usually, makepkg just takes the stuff that pkgver() prints to stdout, so
we can output any log messages to stderr. However, when makepkg is in
logging mode ("makepkg -L ..."), then it merges stdout and stderr
together and uses the result as the pkgver (I'm sure that's a bug!),
which breaks the build horribly due to us logging things. So do not log
anything at all now.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 11 |
2 files changed, 6 insertions, 9 deletions
@@ -1,7 +1,7 @@ pkgbase = fortune-mod-bofh-excuses pkgdesc = BOFH excuses fortune cookie files - pkgver = 20121125.190600 - pkgrel = 5 + pkgver = 20151113.024512 + pkgrel = 1 url = http://www.cs.wisc.edu/~ballard/bofh/ arch = any groups = fortune-mods @@ -2,8 +2,8 @@ # Contributor: lanrat pkgname='fortune-mod-bofh-excuses' -pkgver=20121125.190600 -pkgrel=5 +pkgver=20151113.024512 +pkgrel=1 pkgdesc='BOFH excuses fortune cookie files' arch=('any') url='http://www.cs.wisc.edu/~ballard/bofh/' @@ -19,16 +19,13 @@ pkgver() # Make a HTTP HEAD request and use the Last-Modified header of the data file # to generate the pkgver. Thanks to djmattyg007 for the idea (and the hint that # the Debian package I used previously is somewhat outdated by now :-)! - - msg2 "Determining data file's time of last modification..." - local lastmod=$(curl -fL -I "${_dlurl}" | tac | sed -n '/^Last-modified:[[:space:]]*/I { s///p; q }') + local lastmod=$(curl -sS -fL -I "${_dlurl}" | tac | sed -n '/^Last-modified:[[:space:]]*/I { s///p; q }') if [ -z "$lastmod" ]; then - warning "Could not determine time of last modification, not updating pkgver." return 1 fi - date -ud "${lastmod}" '+%Y%m%d.%H%M%S' || { warning "Failed to generate pkgver, it will not be updated."; return 1; } + date -ud "${lastmod}" '+%Y%m%d.%H%M%S' } prepare() |