summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-10-05 06:05:04 +0000
committerMike Frysinger <vapier@gentoo.org>2009-10-05 06:05:04 +0000
commit8c86bf754af46197823a8b61ad3b86eff4191c66 (patch)
tree4c35de3559bc904cb81092c7ba75e7bbac876149 /eclass/rpm.eclass
parentStable for HPPA (bug #287436). (diff)
downloadhistorical-8c86bf754af46197823a8b61ad3b86eff4191c66.tar.gz
historical-8c86bf754af46197823a8b61ad3b86eff4191c66.tar.bz2
historical-8c86bf754af46197823a8b61ad3b86eff4191c66.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.eclass12
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
}