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

Diff of /eclass/rpm.eclass

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

Revision 1.18 Revision 1.19
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.18 2009/10/05 06:05:04 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.19 2009/10/05 06:14:36 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
14# @FUNCTION: rpm_unpack 14# @FUNCTION: rpm_unpack
15# @USAGE: <rpms> 15# @USAGE: <rpms>
16# @DESCRIPTION: 16# @DESCRIPTION:
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 [[ $# -eq 0 ]] && set -- ${A}
19 local a 20 local a
20 for a in "$@" ; do 21 for a in "$@" ; do
21 echo ">>> Unpacking ${a} to ${PWD}" 22 echo ">>> Unpacking ${a} to ${PWD}"
22 if [[ ${a} == ./* ]] ; then 23 if [[ ${a} == ./* ]] ; then
23 : nothing to do -- path is local 24 : nothing to do -- path is local
38# Unpack the contents of the specified rpms like the unpack() function as well 39# Unpack the contents of the specified rpms like the unpack() function as well
39# as any archives that it might contain. Note that the secondary archive 40# as any archives that it might contain. Note that the secondary archive
40# unpack isn't perfect in that it simply unpacks all archives in the working 41# unpack isn't perfect in that it simply unpacks all archives in the working
41# directory (with the assumption that there weren't any to start with). 42# directory (with the assumption that there weren't any to start with).
42srcrpm_unpack() { 43srcrpm_unpack() {
44 [[ $# -eq 0 ]] && set -- ${A}
43 rpm_unpack "$@" 45 rpm_unpack "$@"
44 46
45 # no .src.rpm files, then nothing to do 47 # no .src.rpm files, then nothing to do
46 [[ "$* " != *".src.rpm " ]] && return 0 48 [[ "$* " != *".src.rpm " ]] && return 0
47 49

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

  ViewVC Help
Powered by ViewVC 1.1.20