From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8D4C01389E2 for ; Sun, 7 Dec 2014 18:44:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 738F1E0CE4; Sun, 7 Dec 2014 18:44:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD761E0C85; Sun, 7 Dec 2014 18:44:05 +0000 (UTC) Received: from [192.168.1.4] (ip70-181-96-121.oc.oc.cox.net [70.181.96.121]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id B57643402B7; Sun, 7 Dec 2014 18:44:04 +0000 (UTC) Message-ID: <54849FF0.9080606@gentoo.org> Date: Sun, 07 Dec 2014 10:44:00 -0800 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: Ulrich Mueller , Zac Medico CC: prefix@gentoo.org, gentoo-alt@lists.gentoo.org, gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH 1/2] bin/phase-helpers.shL Fix unpack() for deb2targz .xz types References: <20141206165201.0dc3ea1c.dolsen@gentoo.org> <5483AF70.5010203@gentoo.org> <21636.13369.46014.480745@a1i15.kph.uni-mainz.de> <5484939C.3090603@gentoo.org> <21636.38607.313282.924087@a1i15.kph.uni-mainz.de> <54849B2B.3010108@gentoo.org> <21636.40525.5635.532908@a1i15.kph.uni-mainz.de> In-Reply-To: <21636.40525.5635.532908@a1i15.kph.uni-mainz.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 98f0876e-cb9c-456c-9840-113054953f2e X-Archives-Hash: 8bfdb8d93448deb5304aa68fbe8cb15a On 12/07/2014 10:37 AM, Ulrich Mueller wrote: >>>>>> On Sun, 07 Dec 2014, Zac Medico wrote: > >> Okay, I guess we can default to ar if [[ $(ar --version 2>&1) == "GNU >> ar"* ]] and otherwise fall back to deb2targz. > > It's sort of trivial, but here is a patch: > > From c53e7057f94728d6e0c7d16c675702ca831b9a5a Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Ulrich=20M=C3=BCller?= > Date: Sun, 7 Dec 2014 19:33:52 +0100 > Subject: [PATCH] Prefer GNU ar when unpacking .deb packages. > > PMS reference: > deb packages (*.deb). Ebuilds must ensure that the deb2targz program > is installed on those platforms where the GNU binutils ar program is > not available and the installed ar program is incompatible with GNU > archives. Otherwise, ebuilds must ensure that GNU binutils is > installed. > --- > bin/phase-helpers.sh | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh > index 6e437da..afad2e9 100644 > --- a/bin/phase-helpers.sh > +++ b/bin/phase-helpers.sh > @@ -448,11 +448,13 @@ unpack() { > "with EAPI '${EAPI}'. Instead use 'deb'." > fi > # Unpacking .deb archives can not always be done with > - # `ar`. For instance on AIX this doesn't work out. If > - # we have `deb2targz` installed, prefer it over `ar` for > - # that reason. We just make sure on AIX `deb2targz` is > + # `ar`. For instance on AIX this doesn't work out. > + # If `ar` is not the GNU binutils version and we have > + # `deb2targz` installed, prefer it over `ar` for that > + # reason. We just make sure on AIX `deb2targz` is > # installed. > - if type -P deb2targz > /dev/null; then > + if [[ $(ar --version 2>/dev/null) != "GNU ar"* ]] && \ > + type -P deb2targz > /dev/null; then > y=${x##*/} > local created_symlink=0 > if [ ! "$srcdir$x" -ef "$y" ] ; then > LGTM. In a separate patch we can also include Brian's deb2targz xz handling for AIX, I guess. -- Thanks, Zac