Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge fails to apply patches
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
corey_s
Apprentice
Apprentice


Joined: 29 Jun 2003
Posts: 264

PostPosted: Tue Nov 21, 2006 1:59 am    Post subject: emerge fails to apply patches Reply with quote

Greetings!


As a purely educational experience, I decided to build a uclibc-based gentoo from scratch using crossdev - which, after some effort, was successful - almost.

I'm now at a point where I have a stand-alone partition, that I can chroot into, which contains a minimal but complete uclibc-based gentoo environment ( essentially the base "system" ).

But there's one problem:

emerge/ebuild mostly work as normal: I can --sync, and --search and --fetch and whatnot.

HOWEVER, for some reason, emerge ( and 'ebuild <package> unpack' ) always fails then dies when it attempts to apply patches:

Code:

>>> Unpacking source...
>>> Unpacking less-394.tar.gz to /var/tmp/portage/less-394/work
 * Applying code2color.patch ...

 * Failed Patch: code2color.patch !
 *  ( /usr/portage/sys-apps/less/files/code2color.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/less-394/temp/code2color.patch-15684.out


!!! ERROR: sys-apps/less-394 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_unpack
  ebuild.sh, line 708:   Called src_unpack
  less-394.ebuild, line 24:   Called epatch '/usr/portage/sys-apps/less/files/code2color.patch'
  eutils.eclass, line 341:   Called die

!!! Failed Patch: code2color.patch!
!!! If you need support, post the topmost build error, and the call stack if relevant.


So that's the first problem.

The second problem is - in the case where a package/ebuild has no patches - when emerge gets to the compile phase, it just quietly croaks:

Code:

scanner libperl # ebuild libperl-5.8.8-r1.ebuild compile
 * perl-5.8.8.tar.bz2 MD5 ;-) ...                                                                                                                                                                                             [ ok ]
 * perl-5.8.8.tar.bz2 RMD160 ;-) ...                                                                                                                                                                                          [ ok ]
 * perl-5.8.8.tar.bz2 SHA1 ;-) ...                                                                                                                                                                                            [ ok ]
 * perl-5.8.8.tar.bz2 SHA256 ;-) ...                                                                                                                                                                                          [ ok ]
 * perl-5.8.8.tar.bz2 size ;-) ...                                                                                                                                                                                            [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                                          [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                        [ ok ]
 * checking perl-5.8.8.tar.bz2 ;-) ...                                                                                                                                                                                        [ ok ]
>>> Checking perl-5.8.8.tar.bz2's mtime...
>>> WORKDIR is up-to-date, keeping...
>>> Compiling source in /var/tmp/portage/libperl-5.8.8-r1/work/perl-5.8.8 ...


... that's it - no error, no nothing - it just stops right after "Compiling source in ...."

I'm guessing these two issues are connected/related, but I don't know how to go about diagnosing and fixing the problem.

Any clues would be much appreciated!

It appears to me that perhaps some portage env var or another is either incorrect or missing entirely? ( I'm able to manually cd into 'var/tmp/portage/<package>/work/<package>' and then manually apply the patch from there with no problem )

Thanks a ton for any help or assistance!

Here's the '/var/tmp/portage/less-394/temp/code2color.patch-15684.out'

Code:

***** code2color.patch *****

============================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-apps/less/files/code2color.patch

============================
patching file code2color
Hunk #3 succeeded at 3193 (offset 1 line).
============================

PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-apps/less/files/code2color.patch

============================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- code2color
|+++ code2color
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
============================

PATCH COMMAND:  patch -p2 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-apps/less/files/code2color.patch

============================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- code2color
|+++ code2color
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
============================

PATCH COMMAND:  patch -p3 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-apps/less/files/code2color.patch

============================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- code2color
|+++ code2color
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
============================

PATCH COMMAND:  patch -p4 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-apps/less/files/code2color.patch

============================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- code2color
|+++ code2color
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum