I noticed this recent commit:
>commit 5c904717322f8113870abf48cc93c3c8b00ab4e8>commit 68558ab72661ec5091323aca7b3ff85679220433>Author: Sören Tempel <email hidden>>Date: Sun Jan 31 13:30:14 2016 +0100>> testing/noice: upgrade to 0.4>> diff --git a/testing/noice/APKBUILD b/testing/noice/APKBUILD> index c2e2eed..77a7f0b 100644>>...>-prepare() {>- local i>- cd "$_builddir">- for i in $source; do>- case $i in>- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;>- esac>- done>-}>-
DON'T DO THAT!
This makes it needlessly hard to add patches: the moment someone wants to
fix a problem, this bites them because they'll try adding a patch,
build, and wonder "Why on earth am I seeing the problem I just fixed?"
I just ran into this with bridge-utils.
Anyhow...
Is there a reason that this couldn't be moved to abuild?
I know that bash uses -p0 patches, which wouldn't work with this.
But other than that, it seems to be a universal constant.
Thanks,
Isaac Dunham
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---
On Sun, 31 Jan 2016 18:09:59 -0800
Isaac Dunham <ibid.ag@gmail.com> wrote:
> I noticed this recent commit:> >commit 5c904717322f8113870abf48cc93c3c8b00ab4e8> >commit 68558ab72661ec5091323aca7b3ff85679220433> >Author: Sören Tempel <email hidden>> >Date: Sun Jan 31 13:30:14 2016 +0100> >> > testing/noice: upgrade to 0.4> >> > diff --git a/testing/noice/APKBUILD b/testing/noice/APKBUILD> > index c2e2eed..77a7f0b 100644> >> >...> >-prepare() {> >- local i> >- cd "$_builddir"> >- for i in $source; do> >- case $i in> >- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;> >- esac> >- done> >-}> >- > > DON'T DO THAT!> > This makes it needlessly hard to add patches: the moment someone wants to> fix a problem, this bites them because they'll try adding a patch,> build, and wonder "Why on earth am I seeing the problem I just fixed?"> > I just ran into this with bridge-utils.
+1
> Anyhow...> Is there a reason that this couldn't be moved to abuild?
Not really.
> I know that bash uses -p0 patches, which wouldn't work with this.> But other than that, it seems to be a universal constant.
I think gentoo tries various -pN variants before error. We could do something like:
patch -p1 -i .... || patch -p0 -i ...
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---
On Mon, 1 Feb 2016 09:21:07 +0100
Natanael Copa <ncopa@alpinelinux.org> wrote:
> On Sun, 31 Jan 2016 18:09:59 -0800> Isaac Dunham <ibid.ag@gmail.com> wrote:> > > Anyhow...> > Is there a reason that this couldn't be moved to abuild? > > Not really.
I think the basic patching could be a dedicated block that goes to
default_prepare or so.
> > I know that bash uses -p0 patches, which wouldn't work with this.> > But other than that, it seems to be a universal constant. > > I think gentoo tries various -pN variants before error. We could do> something like:> > patch -p1 -i .... || patch -p0 -i ...
Please don't do that. It breaks horribly if the patch is only adding
new files. I had major failures due to this kind of hackery early in
gentoo times.
I think we should just require -p1 or force user override the default
step.
Thanks,
Timo
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---
On 01.02.16, Natanael Copa wrote:
> > This makes it needlessly hard to add patches: the moment someone wants to> > fix a problem, this bites them because they'll try adding a patch,> > build, and wonder "Why on earth am I seeing the problem I just fixed?"> > > > I just ran into this with bridge-utils.> > +1
I just assumed that noice was simple enough to probably never need
patches in the future, however, if it's considered a "common practice"
to always keep the prepare function than I will do so in the future.
> > > Anyhow...> > Is there a reason that this couldn't be moved to abuild?> > Not really.
I would also prefer it if all source files matching "*.patch" would be
applied automatically.
> > I know that bash uses -p0 patches, which wouldn't work with this.> > But other than that, it seems to be a universal constant.> > I think gentoo tries various -pN variants before error. We could do something like:> > patch -p1 -i .... || patch -p0 -i ...
That can cause a lot of problems. I think the easier solution would be
to simply add an optional variable (with the default value "-p1") which
allows you to pass extra command line flags to patch(1) from the
APKBUILD itself.
Sören.
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---