Re: [gentoo-dev] Proposed change to base.eclass: patch || die

2005-08-06 Thread Dan Armak
On Friday 05 August 2005 12:34, Diego 'Flameeyes' Pettenò wrote:
 On Friday 29 July 2005 15:56, Dan Armak wrote:
  base.eclass (which inherited by many other eclasses) has an src_unpack
  supporting patching from patchfiles listed in $PATCHES. However, today,
  if patching fails the process doesn't abort.

 About this, there are still problems about committing a change on
 base.eclass to use epatch instead of patch? (so that it also takes care of
 recognize the right strip option)
I don't think there are any problems.

I've been using a modified base.eclass that died if patching failed for the 
last few weeks, so I know the packages I have installed don't have failing 
patches. Since this thread started I've modified it to use epatch and so far 
that's worked OK. 

So I think we can commit this (with epatch, that is). Can I consider the 
thread so far a consensus to let me do it?

BTW, I've managed to lost all my mail from Thursday, so if there was something 
relevant in this thread could someone please forward it to me.

-- 
Dan Armak
Gentoo Linux developer (KDE)
Public GPG key: http://dev.gentoo.org/~danarmak/danarmak-gpg-public.key
Fingerprint: DD70 DBF9 E3D4 6CB9 2FDD  0069 508D 9143 8D5F 8951


pgp57yoBzRYYI.pgp
Description: PGP signature


[gentoo-dev] Proposed change to base.eclass: patch || die

2005-07-29 Thread Dan Armak
Hi all,

base.eclass (which inherited by many other eclasses) has an src_unpack 
supporting patching from patchfiles listed in $PATCHES. However, today, if 
patching fails the process doesn't abort. So I propose:

==
--- base.eclass 11 Jul 2005 15:08:06 -  1.27
+++ base.eclass 29 Jul 2005 13:45:39 -
@@ -35,11 +35,11 @@ base_src_unpack() {
cd ${S}
for x in $PATCHES; do
debug-print $FUNCNAME: autopatch: patching 
from ${x}
-   patch -p0  ${x}
+   patch -p0  ${x} || die Patchfile $x failed 
to apply
done
for x in $PATCHES1; do
debug-print $FUNCNAME: autopatch: patching 
-p1 from ${x}
-   patch -p1  ${x}
+   patch -p1  ${x} || die Patchfile $x failed 
to apply
done
;;
all)


This will make some ebuilds fail which accidentally rely on non-applying 
patches, which is the correct thing to do IMHO. Objections? 

-- 
Dan Armak
Gentoo Linux developer (KDE)
Public GPG key: http://dev.gentoo.org/~danarmak/danarmak-gpg-public.key
Fingerprint: DD70 DBF9 E3D4 6CB9 2FDD  0069 508D 9143 8D5F 8951


pgp3JxWxcL9Pi.pgp
Description: PGP signature


Re: [gentoo-dev] Proposed change to base.eclass: patch || die

2005-07-29 Thread Diego 'Flameeyes' Pettenò
On Friday 29 July 2005 15:56, Dan Armak wrote:
 base.eclass (which inherited by many other eclasses) has an src_unpack
 supporting patching from patchfiles listed in $PATCHES. However, today, if
 patching fails the process doesn't abort.
Why can't we just use epatch?

-- 
Diego Flameeyes Pettenò
Gentoo Developer - http://dev.gentoo.org/~flameeyes/
(Gentoo/FreeBSD, Video, Gentoo/AMD64, Sound, PAM)


pgp5kwlxwyvND.pgp
Description: PGP signature


Re: [gentoo-dev] Proposed change to base.eclass: patch || die

2005-07-29 Thread Diego 'Flameeyes' Pettenò
On Friday 29 July 2005 16:05, Dan Armak wrote:
 Anyway, the effective change would be to die if patching fails (and support
 patchlevels != 0), so my orig question stands.
epatch already takes care of failing, that's why I was thinking about that :)

-- 
Diego Flameeyes Pettenò
Gentoo Developer - http://dev.gentoo.org/~flameeyes/
(Gentoo/FreeBSD, Video, Gentoo/AMD64, Sound, PAM)


pgpfq6QOcvHaZ.pgp
Description: PGP signature