summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-21 05:45:29 +0000
committerMike Frysinger <vapier@gentoo.org>2012-04-21 05:45:29 +0000
commit03c90564caeb04f0e940955b6df9146e44378ee5 (patch)
tree7710361407afc34bc0860a7e4c305bba949e0296 /eclass/unpacker.eclass
parentInstall to libdir instead of libexecdir. (diff)
downloadhistorical-03c90564caeb04f0e940955b6df9146e44378ee5.tar.gz
historical-03c90564caeb04f0e940955b6df9146e44378ee5.tar.bz2
historical-03c90564caeb04f0e940955b6df9146e44378ee5.zip
fix by Christoph Junghans to make unpack_deb work on AIX (prefix) systems #408801
Diffstat (limited to 'eclass/unpacker.eclass')
-rw-r--r--eclass/unpacker.eclass25
1 files changed, 22 insertions, 3 deletions
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index 5b1d7ea1856d..993e2460267a 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/unpacker.eclass,v 1.6 2012/04/05 03:20:42 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/unpacker.eclass,v 1.7 2012/04/21 05:45:29 vapier Exp $
# @ECLASS: unpacker.eclass
# @MAINTAINER:
@@ -253,8 +253,27 @@ unpack_deb() {
unpack_banner "${deb}"
- ar x "${deb}"
- unpack ./data.tar*
+ # on AIX ar doesn't work out as their ar used a different format
+ # from what GNU ar (and thus what .deb files) produce
+ if [[ -n ${EPREFIX} ]] ; then
+ {
+ read # global header
+ [[ ${REPLY} = "!<arch>" ]] || die "${deb} does not seem to be a deb archive"
+ local f timestamp uid gid mode size magic
+ while read f timestamp uid gid mode size magic ; do
+ [[ -n ${f} && -n ${size} ]] || continue # ignore empty lines
+ if [[ ${f} = "data.tar"* ]] ; then
+ head -c "${size}" > "${f}"
+ else
+ head -c "${size}" > /dev/null # trash it
+ fi
+ done
+ } < "${deb}"
+ else
+ ar x "${deb}"
+ fi
+
+ unpacker ./data.tar*
}
# @FUNCTION: _unpacker