From 90f27119e2d266e96f09c241d7cc84a72974d11d Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 11 Feb 2009 11:40:36 -0500 Subject: Emit makepkg --allsource to a logfile One log file per package, in /var/log/sourceballs for easier lookup and reference. Log file is removed if the command succeeds, and gzipped on failure Signed-off-by: Aaron Griffin --- misc-scripts/make-sourceball | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'misc-scripts') diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index cdbd697..f45eba8 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -18,6 +18,7 @@ reponame="$2" arch="$3" srcpath="$FTP_BASE/sources/" +logpath="/var/log/sourceballs/" WORKDIR="/tmp/make-sourceball.$packagename.$UID" @@ -65,11 +66,13 @@ create_srcpackage() { cleanup 0 fi - if ! /usr/bin/makepkg --allsource >/dev/null 2>&1; then + if ! /usr/bin/makepkg --allsource >"$logpath/$pkgname" 2>&1; then popd >/dev/null + /bin/gzip -9 "$logpath/$pkgname" die "\tFailed to download source for $pkgname-$pkgver-$pkgrel ($reponame-$arch)" fi popd >/dev/null + /bin/rm "$logpath/$pkgname" local pkg_file="${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" @@ -94,6 +97,7 @@ trap cleanup 0 1 set_umask /bin/mkdir -p "$WORKDIR" +/bin/mkdir -p "$logpath" cd "$WORKDIR" if /usr/bin/svn export -q "$SVN_PATH/$packagename/repos/$reponame-$arch" $packagename; then -- cgit v1.2.3-24-g4f1b