From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-885963-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id EC38313829C
	for <garchives@archives.gentoo.org>; Tue,  7 Jun 2016 12:50:57 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0965E21C038;
	Tue,  7 Jun 2016 12:50:55 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 85157254020
	for <gentoo-commits@lists.gentoo.org>; Tue,  7 Jun 2016 12:50:54 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 8EA9A340D02
	for <gentoo-commits@lists.gentoo.org>; Tue,  7 Jun 2016 12:50:53 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 42AA41F02
	for <gentoo-commits@lists.gentoo.org>; Tue,  7 Jun 2016 12:50:50 +0000 (UTC)
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" <ulm@gentoo.org>
Message-ID: <1465302854.e58107167fffbe1d0e4c0560b8be5a9d28c5c55d.ulm@gentoo>
Subject: [gentoo-commits] proj/emacs-tools:emacs-updater commit in: /
X-VCS-Repository: proj/emacs-tools
X-VCS-Files: ChangeLog emacs-updater
X-VCS-Directories: /
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: e58107167fffbe1d0e4c0560b8be5a9d28c5c55d
X-VCS-Branch: emacs-updater
Date: Tue,  7 Jun 2016 12:50:50 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: fa4a2947-9057-45d0-8cab-f0d0d08fe152
X-Archives-Hash: cb27c8756d336b04279eee2582e781ac

commit:     e58107167fffbe1d0e4c0560b8be5a9d28c5c55d
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  7 12:34:14 2016 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Jun  7 12:34:14 2016 +0000
URL:        https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=e5810716

Run qfile under xargs since it has lost the -f option.

* emacs-updater: Run qfile under xargs since portage-utils-0.61
has lost the -f option. Fixes bug 584984. Enable the pipefail
option in bash, in order to check qfile's exit status.

 ChangeLog     |  6 ++++++
 emacs-updater | 10 +++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7f8124d..8954223 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-07  Ulrich Müller  <ulm@gentoo.org>
+
+	* emacs-updater: Run qfile under xargs since portage-utils-0.61
+	has lost the -f option. Fixes bug 584984. Enable the pipefail
+	option in bash, in order to check qfile's exit status.
+
 2014-06-05  Ulrich Müller  <ulm@gentoo.org>
 
 	* Version 1.14 released.

diff --git a/emacs-updater b/emacs-updater
index 8d33bae..361817b 100755
--- a/emacs-updater
+++ b/emacs-updater
@@ -268,6 +268,7 @@ cleanup() {
 }
 
 trap cleanup EXIT
+set -o pipefail
 
 TMPFILE="$(mktemp ${TMPDIR:-/tmp}/emacs-updater.files.XXXXXX)"
 PKGFILE="$(mktemp ${TMPDIR:-/tmp}/emacs-updater.pkgs.XXXXXX)"
@@ -286,14 +287,17 @@ NO_OF_FILES=$(wc -l <"${TMPFILE}")
 message "Assigning ${NO_OF_FILES} file${s} to packages ..."
 
 if [[ ${ORPHANS} ]]; then
-    qfile -oCR -f "${TMPFILE}" | sort -u > "${PKGFILE}"
+    xargs qfile -oCR <"${TMPFILE}" | sort -u >"${PKGFILE}"
 elif [[ ${EXACT} ]]; then
-    qfile -eqCR -f "${TMPFILE}" | sort -u | sed 's/^/=/' > "${PKGFILE}"
+    xargs qfile -eqCR <"${TMPFILE}" | sort -u | sed 's/^/=/' >"${PKGFILE}"
 else
     # Get package and slot number, requires >=portage-utils-0.3
-    qfile -SqCR -f "${TMPFILE}" | sort -u > "${PKGFILE}"
+    xargs qfile -SqCR <"${TMPFILE}" | sort -u >"${PKGFILE}"
 fi
 
+ret=$?
+[[ ${ret} -eq 0 ]] || { failure "Error running qfile"; exit ${ret}; }
+
 NO_OF_PACKAGES=$(wc -l <"${PKGFILE}")
 [[ ${NO_OF_PACKAGES} -eq 1 ]] && s= || s=s
 if [[ ${ORPHANS} ]]; then