[NOT A SOLUTION] Fwd: automatically modifying scriptlets (included files) at package build time
Eddy Petrișor
eddy.petrisor at gmail.com
Wed Mar 19 16:25:29 UTC 2008
On 18/03/2008, Eddy Petrișor <eddy.petrisor at gmail.com> wrote:
> On 18/03/2008, Eddy Petrișor <eddy.petrisor at gmail.com> wrote:
> > On 18/03/2008, Ralf Corsepius <rc040203 at freenet.de> wrote:
> > >
> > > On Tue, 2008-03-18 at 16:33 +0200, Eddy Petrișor wrote:
> > > > On 18/03/2008, Ralf Corsepius <rc040203 at freenet.de> wrote:
> > >
> > >
> > > > > You will want to work on copies of your SOURCEX's instead of SOURCEX
> > > > > directly.
> > > >
> > > > I will dig into this, since I really dislike having outside scripts doing this.
> > >
> > >
> > > I'd assume you to be pretty close to a functional solution and to be
> > > facing issues with details of your implementation.
> >
> >
> > Actually, I am stuck because it seems that the alteration happening in
> > the %prep phase either happens too late or happens on some temporary
> > files which do not end up in the binary rpm.
> >
> > I suspect the later, since I see this in the build log:
> >
> > + . common.inf
> > ++ VERS=2
> > ++ SUBVERS=1
> > ++ RELEASE=.i4.22
> > ++ echo 2.1..i4.22
> > ++ tr -s .
> > + export THISVER=2.1.i4.22
> > + THISVER=2.1.i4.22
> > + echo 'This version (as sourced from the package) is: 2.1.i4.22'
> > This version (as sourced from the package) is: 2.1.i4.22
> > + sed -i 's#^THISVER=.*#THISVER="2.1.i4.22"#'
> > /usr/src/redhat/SOURCES/common.pre.sh
> > + sed -i 's#^THISVER=.*#THISVER="2.1.i4.22"#'
> > /usr/src/redhat/SOURCES/common.post.sh
> > + exit 0
>
>
> Actually the replace is made on the real
> /usr/src/redhat/SOURCES/common.post.sh, but it seems those files are
> already part of the running spec when I am doing the replacement.
>
> I didn't saw this because I was doing builds in a chroot by feeding
> the rpm inside that chroot a src.rpm.
I decided to use some outside script.
--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
More information about the devel
mailing list