/[gentoo-x86]/eclass/rpm.eclass
Gentoo

Diff of /eclass/rpm.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.17 Revision 1.18
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.17 2009/10/03 08:56:17 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.18 2009/10/05 06:05:04 vapier Exp $
4 4
5# @ECLASS: rpm.eclass 5# @ECLASS: rpm.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: convenience class for extracting RPMs 8# @BLURB: convenience class for extracting RPMs
17# Unpack the contents of the specified rpms like the unpack() function. 17# Unpack the contents of the specified rpms like the unpack() function.
18rpm_unpack() { 18rpm_unpack() {
19 local a 19 local a
20 for a in "$@" ; do 20 for a in "$@" ; do
21 echo ">>> Unpacking ${a} to ${PWD}" 21 echo ">>> Unpacking ${a} to ${PWD}"
22 [[ ${a} != ./* ]] && a="${DISTDIR}/${a}" 22 if [[ ${a} == ./* ]] ; then
23 : nothing to do -- path is local
24 elif [[ ${a} == ${DISTDIR}/* ]] ; then
25 ewarn 'QA: do not use ${DISTDIR} with rpm_unpack -- it is added for you'
26 elif [[ ${a} == /* ]] ; then
27 ewarn 'QA: do not use full paths with rpm_unpack -- use ./ paths instead'
28 else
29 a="${DISTDIR}/${a}"
30 fi
23 rpm2tar -O "${a}" | tar xf - || die "failure unpacking ${a}" 31 rpm2tar -O "${a}" | tar xf - || die "failure unpacking ${a}"
24 done 32 done
25} 33}
26 34
27# @FUNCTION: srcrpm_unpack 35# @FUNCTION: srcrpm_unpack

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20