aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-01-23 10:55:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-01-23 10:55:40 +0000
commitb8635166551b3f0d3068fd702fb5e130a22180fb (patch)
treecf0228b61626dfc4db6f9149d6f2cf618280372b
parent88992785bd6fef3a9be38189108c074ba0f1e59b (diff)
downloadpaludis-b8635166551b3f0d3068fd702fb5e130a22180fb.tar.gz
paludis-b8635166551b3f0d3068fd702fb5e130a22180fb.tar.xz
Recent Portage unpacks lzma files, in violation of PMS and without any way of ebuilds being able to check for this behaviour. Emulate this stupidity.
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/unpack13
1 files changed, 12 insertions, 1 deletions
diff --git a/paludis/repositories/e/ebuild/utils/unpack b/paludis/repositories/e/ebuild/utils/unpack
index 5b88d70..0421596 100755
--- a/paludis/repositories/e/ebuild/utils/unpack
+++ b/paludis/repositories/e/ebuild/utils/unpack
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -90,6 +90,17 @@ unpack_one()
ar x "${1}" 1>&2
;;
+ *.tar.lzma)
+ echo lzma -dc "${1}" \| tar xf - --no-same-owner "${TAR_OPTIONS[@]}"
+ lzma -dc "${1}" | tar xf - --no-same-owner "${TAR_OPTIONS[@]}"
+ assert "Couldn't unpack ${1}"
+ ;;
+
+ *.lzma)
+ echo lzma -dc "${1}" > ${UNPACKTODIR}/$(basename "${1%.*}" ) 1>&2
+ lzma -dc "${1}" > ${UNPACKTODIR}/$(basename "${1%.*}" ) || die "Couldn't unpack ${1}"
+ ;;
+
*)
echo "Skipping unpack for ${1}"
;;