diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-10-05 06:05:04 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-10-05 06:05:04 +0000 |
commit | 16719d0d1dd182dcc2053cf637301e635e320457 (patch) | |
tree | fce668d9541ed2d4594798bfdd517339785f0960 /eclass/rpm.eclass | |
parent | Stable for HPPA (bug #287436). (diff) | |
download | gentoo-2-16719d0d1dd182dcc2053cf637301e635e320457.tar.gz gentoo-2-16719d0d1dd182dcc2053cf637301e635e320457.tar.bz2 gentoo-2-16719d0d1dd182dcc2053cf637301e635e320457.zip |
since the API for rpm_unpack has changed, detect poor behavior and warn about it rather than outright failing #287536
Diffstat (limited to 'eclass/rpm.eclass')
-rw-r--r-- | eclass/rpm.eclass | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass index 79c6fc027293..d5c4315153c7 100644 --- a/eclass/rpm.eclass +++ b/eclass/rpm.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.17 2009/10/03 08:56:17 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.18 2009/10/05 06:05:04 vapier Exp $ # @ECLASS: rpm.eclass # @MAINTAINER: @@ -19,7 +19,15 @@ rpm_unpack() { local a for a in "$@" ; do echo ">>> Unpacking ${a} to ${PWD}" - [[ ${a} != ./* ]] && a="${DISTDIR}/${a}" + if [[ ${a} == ./* ]] ; then + : nothing to do -- path is local + elif [[ ${a} == ${DISTDIR}/* ]] ; then + ewarn 'QA: do not use ${DISTDIR} with rpm_unpack -- it is added for you' + elif [[ ${a} == /* ]] ; then + ewarn 'QA: do not use full paths with rpm_unpack -- use ./ paths instead' + else + a="${DISTDIR}/${a}" + fi rpm2tar -O "${a}" | tar xf - || die "failure unpacking ${a}" done } |