Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260195 - EAPI=2: kde_src_unpack applies patches, when they should be applied in src_prepare
Summary: EAPI=2: kde_src_unpack applies patches, when they should be applied in src_pr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Highest major (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-25 02:11 UTC by Marc Schiffbauer
Modified: 2009-05-27 00:55 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info,9.94 KB, text/plain)
2009-02-25 23:10 UTC, Marc Schiffbauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer gentoo-dev 2009-02-25 02:11:17 UTC
emerge kphotoalbum fails on ~AMD64

Messages:
 * Failed Patch: kphotoalbum-3.1.1-gcc-4.3.patch !
 *  ( /usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/temp/kphotoalbum-3.1.1-gcc-4.3.patch-16112.out
 *
 * ERROR: media-gfx/kphotoalbum-3.1.1-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 4235:  Called base_src_prepare
 *             environment, line  660:  Called base_src_util 'autopatch'
 *             environment, line  703:  Called epatch '/usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.patch'
 *             environment, line 2220:  Called die
 * The specific snippet of code:
 *                   die "Failed Patch: ${patchname}!";
 *  The die message:
 *   Failed Patch: kphotoalbum-3.1.1-gcc-4.3.patch!
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/temp/environment'.
 *



Reproducible: Always

Steps to Reproduce:
1. emerge kphotoalbum
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-02-25 04:43:28 UTC
Looks ok to me.. This patch is over 11 months old now.

(testing-amd64-chroot) JOlaptop kphotoalbum # ebuild kphotoalbum-3.1.1-r2.ebuild
 unpack
>>> Downloading 'http://gentoo.cites.uiuc.edu/pub/gentoo/distfiles/kphotoalbum-3
.1.1.tar.bz2'
--2009-02-25 04:40:37--  http://gentoo.cites.uiuc.edu/pub/gentoo/distfiles/kphot
oalbum-3.1.1.tar.bz2
Resolving gentoo.cites.uiuc.edu... 128.174.5.78
Connecting to gentoo.cites.uiuc.edu|128.174.5.78|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15503061 (15M) [application/x-tar]
Saving to: `/usr/portage/distfiles/kphotoalbum-3.1.1.tar.bz2'

100%[======================================>] 15,503,061   607K/s   in 22s     

2009-02-25 04:40:59 (690 KB/s) - `/usr/portage/distfiles/kphotoalbum-3.1.1.tar.bz2' saved [15503061/15503061]

 * kphotoalbum-3.1.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...             [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * checking kphotoalbum-3.1.1.tar.bz2 ;-) ...                            [ ok ]
>>> Unpacking source...
>>> Unpacking kphotoalbum-3.1.1.tar.bz2 to /var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/work
 * Applying kphotoalbum-3.1.1-gcc-4.3.patch ...                           [ ok ]
 * Applying kphotoalbum-3.1.1-desktop-files-fixes.diff ...                [ ok ]
 * You can drop some of the translations of the interface and
 * documentation by setting the ${LINGUAS} variable to the
 * languages you want installed.
 * 
 * Enabling all languages
>>> Source unpacked.

Perhaps you need to find a different mirror to sync from? There isn't enough information here to answer completely. Please post your emerge --info if it is still a problem.
Comment 2 Marc Schiffbauer gentoo-dev 2009-02-25 23:08:13 UTC
Hm.. strange.. for it really does not work: I now used the same mirror as you did: same error.

This is the patch output, looks like it does not find the file to patch:

bart ~ # cat /var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/temp/kphotoalbum-3.1.1-gcc-4.3.patch-17771.out                     
***** kphotoalbum-3.1.1-gcc-4.3.patch *****                                                                                     

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

PATCH COMMAND:   patch -p0 -g0 -E --no-backup-if-mismatch < /usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.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:                
--------------------------                      
|--- kphotoalbum-3.1.1/src/MainWindow/Window.cpp        (revision 787701)
|+++ kphotoalbum-3.1.1/src/MainWindow/Window.cpp        (revision 787702)
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
===========================================

PATCH COMMAND:   patch -p1 -g0 -E --no-backup-if-mismatch < /usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.patch

===========================================
patching file src/MainWindow/Window.cpp
Hunk #1 FAILED at 108.
1 out of 1 hunk FAILED -- saving rejects to file src/MainWindow/Window.cpp.rej
===========================================

PATCH COMMAND:   patch -p2 -g0 -E --no-backup-if-mismatch < /usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.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:
--------------------------
|--- kphotoalbum-3.1.1/src/MainWindow/Window.cpp        (revision 787701)
|+++ kphotoalbum-3.1.1/src/MainWindow/Window.cpp        (revision 787702)
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
===========================================

PATCH COMMAND:   patch -p3 -g0 -E --no-backup-if-mismatch < /usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.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:
--------------------------
|--- kphotoalbum-3.1.1/src/MainWindow/Window.cpp        (revision 787701)
|+++ kphotoalbum-3.1.1/src/MainWindow/Window.cpp        (revision 787702)
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
===========================================

PATCH COMMAND:   patch -p4 -g0 -E --no-backup-if-mismatch < /usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.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:
--------------------------
|--- kphotoalbum-3.1.1/src/MainWindow/Window.cpp        (revision 787701)
|+++ kphotoalbum-3.1.1/src/MainWindow/Window.cpp        (revision 787702)
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
bart ~ #


Comment 3 Marc Schiffbauer gentoo-dev 2009-02-25 23:10:09 UTC
Created attachment 183204 [details]
emerge --info
Comment 4 Timothee Groleau 2009-03-01 14:13:03 UTC
Not sure if it the same problem, but when trying to emerge a second ago (01/03/2009), it also fails on the patch. Seems it's because it tries to apply the patch twice, the second time being after setting the languages (see below install echo.

My portage is "sys-apps/portage-2.1.6.7  USE="-build -doc -epydoc (-selinux)" LINGUAS="-pl" 0 kB"

See:

# emerge -v kphotoalbum

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] media-gfx/kphotoalbum-3.1.1-r2  USE="exif raw xinerama -debug" LINGUAS="fr -ar -be -br -ca -cs -cy -da -de -el -en_GB -es -et -fi -ga -gl -hi -is -it -ja -ka -lt -ms -mt -nb -nds -nl -pa -pl -pt -pt_BR -ro -ru -rw -sk -sr -sr@Latn -sv -ta -tr -uk -vi -zh_CN" 15,140 kB

Total: 1 package (1 reinstall), Size of downloads: 15,140 kB


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) media-gfx/kphotoalbum-3.1.1-r2
>>> Downloading 'ftp://ftp.kaist.ac.kr/gentoo/distfiles/kphotoalbum-3.1.1.tar.bz2'
--2009-03-01 22:35:42--  ftp://ftp.kaist.ac.kr/gentoo/distfiles/kphotoalbum-3.1.1.tar.bz2
           => `/usr/portage/distfiles/kphotoalbum-3.1.1.tar.bz2'
Resolving ftp.kaist.ac.kr... 143.248.234.110
Connecting to ftp.kaist.ac.kr|143.248.234.110|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /gentoo/distfiles ... done.
==> SIZE kphotoalbum-3.1.1.tar.bz2 ... 15503061
==> PASV ... done.    ==> RETR kphotoalbum-3.1.1.tar.bz2 ... done.
Length: 15503061 (15M)

100%[========================================================================================================================================>] 15,503,061   173K/s   in 90s

2009-03-01 22:37:19 (168 KB/s) - `/usr/portage/distfiles/kphotoalbum-3.1.1.tar.bz2' saved [15503061]

 * kphotoalbum-3.1.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                               [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                       [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                      [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                     [ ok ]
>>> Unpacking source...
>>> Unpacking kphotoalbum-3.1.1.tar.bz2 to /var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/work
 * Applying kphotoalbum-3.1.1-gcc-4.3.patch ...                                                                                                                             [ ok ]
 * Applying kphotoalbum-3.1.1-desktop-files-fixes.diff ...                                                                                                                  [ ok ]
 * Enabling translations for: fr
>>> Source unpacked in /var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/work
 * Applying kphotoalbum-3.1.1-gcc-4.3.patch ...

 * Failed Patch: kphotoalbum-3.1.1-gcc-4.3.patch !
 *  ( /usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/temp/kphotoalbum-3.1.1-gcc-4.3.patch-12295.out

 *
 * ERROR: media-gfx/kphotoalbum-3.1.1-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_prepare
 *             environment, line 4175:  Called base_src_prepare
 *             environment, line  645:  Called base_src_util 'autopatch'
 *             environment, line  688:  Called epatch '/usr/portage/media-gfx/kphotoalbum/files/kphotoalbum-3.1.1-gcc-4.3.patch'
 *             environment, line 2205:  Called die
 * The specific snippet of code:
 *                   die "Failed Patch: ${patchname}!";
 *  The die message:
 *   Failed Patch: kphotoalbum-3.1.1-gcc-4.3.patch!
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/kphotoalbum-3.1.1-r2/temp/environment'.
 *
Comment 5 Dave 2009-03-04 12:14:50 UTC
I get this on regular x86.
I think this also happens on my ppc powerbook as well.

Change hardware to "All"?
Comment 6 Jan Schubert 2009-03-16 20:45:59 UTC
same here on x86
Comment 7 Marc Neuhaus 2009-03-22 15:56:49 UTC
same here on amd64
Comment 8 Ioannis Aslanidis (RETIRED) gentoo-dev 2009-04-04 19:43:44 UTC
Do you guys experience the same problem with kphotoalbum-3.1.1-r1?

I suspect that Carsten's patches broke the application for this patch.
Comment 9 Ioannis Aslanidis (RETIRED) gentoo-dev 2009-04-04 19:45:19 UTC
So actually the problem is that the patch is applied twice!
Comment 10 Ioannis Aslanidis (RETIRED) gentoo-dev 2009-04-04 19:49:58 UTC
Same problem as bug #262428. Blame EAPI=2.
Comment 11 Ioannis Aslanidis (RETIRED) gentoo-dev 2009-04-04 20:02:26 UTC
OK, so the problem is not in the build, but in the kde eclasses and EAPI 2.

src_unpack calls kde_src_unpack, which applies the patches
src_prepare tries to re-apply the patches

This is why the patch gets applied twice and fails miserably.
Comment 12 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2009-05-27 00:55:53 UTC
fixed some time ago.
Just for the record, scarabeus did the wonderful work of eapi2-ing kde3 eclasses, reavertm did the prefix patches in kde-functions.eclass and wired did the final hacks :)