public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: Zac Medico <zmedico@gentoo.org>
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
Date: Sun, 7 Dec 2014 19:37:01 +0100	[thread overview]
Message-ID: <21636.40525.5635.532908@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <54849B2B.3010108@gentoo.org>

>>>>> 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?= <ulm@gentoo.org>
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
-- 
2.2.0



  reply	other threads:[~2014-12-07 18:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-07  0:52 [gentoo-portage-dev] [PATCH 1/2] bin/phase-helpers.shL Fix unpack() for deb2targz .xz types Brian Dolbec
2014-12-07  1:37 ` Zac Medico
2014-12-07 11:04   ` Ulrich Mueller
2014-12-07 17:51     ` Zac Medico
2014-12-07 18:05       ` Ulrich Mueller
2014-12-07 18:23         ` Zac Medico
2014-12-07 18:37           ` Ulrich Mueller [this message]
2014-12-07 18:44             ` Zac Medico
2014-12-07 18:47               ` Ulrich Mueller
2014-12-07 18:49                 ` Zac Medico
2014-12-07 19:23                   ` Fabian Groffen
2014-12-07 19:30                     ` [gentoo-alt] " Zac Medico
2014-12-07 19:41                       ` Ulrich Mueller
2014-12-07 19:46                         ` Zac Medico
     [not found]                           ` <CANgp9kzeR-zt5z0DdxRL+W9pp2NqMcY7Eb72HuwYyezCiKRi_g@mail.gmail.com>
2014-12-08  3:50                             ` Zac Medico
2014-12-08  8:45                               ` Ulrich Mueller
2014-12-08 15:28                                 ` Zac Medico
2014-12-08  8:58                               ` Michał Górny
2014-12-07 23:24                 ` Brian Dolbec
2014-12-07 17:54 ` Zac Medico
2014-12-07 18:26   ` Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21636.40525.5635.532908@a1i15.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=gentoo-alt@lists.gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    --cc=prefix@gentoo.org \
    --cc=zmedico@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox