Mail archive
alpine-aports

Re: [alpine-aports] Please *don't* drop prepare!

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Mon, 1 Feb 2016 09:21:07 +0100

On Sun, 31 Jan 2016 18:09:59 -0800
Isaac Dunham <ibid.ag_at_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_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Feb 01 2016 - 09:21:07 GMT