FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-12-2009, 05:44 PM
Donnie Berkholz
 
Default gentoo-x86 commit in eclass: rpm.eclass

On 04:29 Thu 12 Mar , Mike Frysinger (vapier) wrote:
> Modified: rpm.eclass
> Log:
> add a func to automatically process patches in rpm specs

> +# @FUNCTION: rpm_spec_epatch
> +# @USAGE: [spec]
> +# @DESCRIPTION:
> +# Read the specified spec (defaults to ${PN}.spec) and attempt to apply
> +# all the patches listed in it. If the spec does funky things like moving
> +# files around, well this won't handle that.
> +rpm_spec_epatch() {
> + local p spec=${1:-${PN}.spec}
> + local dir=${spec%/*}
> + grep '^%patch' "${spec}" |
> + while read line ; do
> + set -- ${line}
> + p=$1
> + shift
> + EPATCH_OPTS="$*"
> + set -- $(grep "^P${p#%p}: " "${spec}")
> + shift
> + epatch "${dir:+${dir}/}$*"
> + done
> +}
> +

Very cool! How about adding this to a default src_prepare() for EAPI=2?

--
Thanks,
Donnie

Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com
 
Old 03-12-2009, 08:05 PM
Mike Frysinger
 
Default gentoo-x86 commit in eclass: rpm.eclass

On Thursday 12 March 2009 14:44:21 Donnie Berkholz wrote:
> On 04:29 Thu 12 Mar , Mike Frysinger (vapier) wrote:
> > Modified: rpm.eclass
> > Log:
> > add a func to automatically process patches in rpm specs
> >
> > +# @FUNCTION: rpm_spec_epatch
> > +# @USAGE: [spec]
> > +# @DESCRIPTION:
> > +# Read the specified spec (defaults to ${PN}.spec) and attempt to apply
> > +# all the patches listed in it. If the spec does funky things like
> > moving +# files around, well this won't handle that.
> > +rpm_spec_epatch() {
> > + local p spec=${1:-${PN}.spec}
> > + local dir=${spec%/*}
> > + grep '^%patch' "${spec}" |
> > + while read line ; do
> > + set -- ${line}
> > + p=$1
> > + shift
> > + EPATCH_OPTS="$*"
> > + set -- $(grep "^P${p#%p}: " "${spec}")
> > + shift
> > + epatch "${dir:+${dir}/}$*"
> > + done
> > +}
> > +
>
> Very cool! How about adding this to a default src_prepare() for EAPI=2?

many specs do weird things like changing dirs/files/whatever, so i dont think
making it a default is viable. especially when people only want rpm.elcass
for rpm_unpack, not for rpm_src_unpack.
-mike
 

Thread Tools




All times are GMT. The time now is 12:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org