summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-04-18 15:09:16 +0000
committerMike Frysinger <vapier@gentoo.org>2011-04-18 15:09:16 +0000
commit373d48b4fe39f7c1323a3c72bfda810397884b97 (patch)
treef0978972b7be8088224f64c902e97a913f45a025 /eclass/eutils.eclass
parentVersion bump (diff)
downloadgentoo-2-373d48b4fe39f7c1323a3c72bfda810397884b97.tar.gz
gentoo-2-373d48b4fe39f7c1323a3c72bfda810397884b97.tar.bz2
gentoo-2-373d48b4fe39f7c1323a3c72bfda810397884b97.zip
unpack_makeself: catch errors from `file`
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 41470ccf1151..b2b10ff4d4b5 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.355 2011/03/18 20:36:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.356 2011/04/18 15:09:16 vapier Exp $
# @ECLASS: eutils.eclass
# @MAINTAINER:
@@ -1393,9 +1393,9 @@ unpack_makeself() {
esac
# lets grab the first few bytes of the file to figure out what kind of archive it is
- local tmpfile=$(emktemp)
+ local filetype tmpfile=$(emktemp)
eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}"
- local filetype=$(file -b "${tmpfile}")
+ filetype=$(file -b "${tmpfile}") || die
case ${filetype} in
*tar\ archive*)
eval ${exe} | tar --no-same-owner -xf -