Change logic to always use deb2targz if deb2targz is available, and fall
authorFabian Groffen <grobian@gentoo.org>
Sat, 14 Apr 2007 19:43:45 +0000 (19:43 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 14 Apr 2007 19:43:45 +0000 (19:43 -0000)
back on ar if unavailable.  This avoids some CHOST logic, which I don't
really get (yet).

svn path=/main/branches/prefix/; revision=6406

bin/ebuild.sh

index b00ccd5551ea63ef8259946ebcea59bba06f3598..2fdc726ae7f4b767777ab8bc3b0e7c820323abc3 100755 (executable)
@@ -373,11 +373,12 @@ unpack() {
                                lha xqf "${srcdir}/${x}" || die "$myfail"
                                ;;
                        deb)
-                               # unpacking .deb archives can only be done with a GNU
-                               # binutils (compatible) ar.  So if we don't have that,
-                               # which only is on AIX for the moment, use deb2targz and
-                               # unpack that one
-                               if [[ ${CHOST} == *-aix* ]]; then
+                               # 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
+                               # installed.
+                               if type -p deb2targz &>/dev/null; then
                                        deb2targz "${srcdir}/${x}" || die "$myfail"
                                        mv "${srcdir}/${x/.deb/.tar.gz}" data.tar.gz
                                else