summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2008-05-13 22:41:38 +0000
committerMarius Mauch <genone@gentoo.org>2008-05-13 22:41:38 +0000
commit40b0227695dba81f69f6203a78f509b8302063d2 (patch)
tree57babcb39e68a1f35a2d965d6ba17fcc8c9fe0d3
parentc84bd2163350f00815aa6170bb40ff6605239f79 (diff)
downloadportage-40b0227695dba81f69f6203a78f509b8302063d2.tar.gz
portage-40b0227695dba81f69f6203a78f509b8302063d2.tar.bz2
portage-40b0227695dba81f69f6203a78f509b8302063d2.zip
Prefer deb2tgz over ar for unpacking .deb files when installed (patch by Fabian Groffen, http://archives.gentoo.org/gentoo-portage-dev/msg_2f9c8543016f1a96f9122aca0ec35ded.xml)
svn path=/main/trunk/; revision=10327
-rwxr-xr-xbin/ebuild.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index b58962343..ecc825464 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -372,9 +372,22 @@ unpack() {
LHa|LHA|lha|lzh)
lha xfq "${srcdir}${x}" || die "$myfail"
;;
- a|deb)
+ a)
ar x "${srcdir}${x}" || die "$myfail"
;;
+ deb)
+ # 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
+ ar x "${srcdir}/${x}" || die "$myfail"
+ fi
+ ;;
lzma)
if [ "${y}" == "tar" ]; then
lzma -dc "${srcdir}${x}" | tar xof - ${tar_opts}