[pacman-dev] [PATCH] Integrate versionpkg into makepkg

Aaron Griffin aaronmgriffin at gmail.com
Fri Oct 26 16:02:08 EDT 2007


On 10/26/07, Scott Horowitz <stonecrest at gmail.com> wrote:
> On 10/26/07, Dan McGee <dpmcgee at gmail.com> wrote:
> > On 10/26/07, Scott Horowitz <stonecrest at gmail.com> wrote:
> > > On 10/26/07, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
> > > >
> > > > I only have a few comments, which are probably more directed at
> > > > versionpkg itself.
> > > >
> > > > > +update_pb() {
> > > > > +       sed -i "1,11 s/pkgver=[^ ]*/pkgver=$1/" ./$BUILDSCRIPT
> > > > > +}
> > > > > +
> > > >
> > > > The 1,11 scares me here. It seems kinda arbitrary. To me this seems better:
> > > >
> > > >    sed -i "s/^pkgver=[^ ]*/pkgver=$1/" ./$BUILDSCRIPT
> > > >
> > > > But might also fail. I don't know, but the 1,11 choice is off-putting to me.
> > >
> > > How might it fail? And yes, that function is pretty much directly from
> > > versionpkg..
> >
> > If the pkgver is not in the first 11 lines of the PKGBUILD? It seems
> > pretty arbitrary for versionpkg to enforce that.
>
> Oh sorry, I meant to ask how it might fail if you removed that first
> 11 lines part. Aaron said "But might also fail?" to his own line. And
> I'm not suggesting it won't, I'm more curious than anything.

By "fail" in MY example, I meant that it will rewrite any pkgver=X
that starts at column 0.... so it could brake things like:


build() {
   ./configure --version \
pkgver=1
   make
}

and WON'T work with any space in front of pkgver.

Still, it's a better metric than the 11 line one




More information about the pacman-dev mailing list