1 |
Ladislav Laska wrote: |
2 |
> Hello, |
3 |
> |
4 |
> just what I had in mind. Works just fine with everything I tested - good job. |
5 |
> |
6 |
> Regards Ladislav Laska |
7 |
> S pozdravem Ladislav Laska |
8 |
> --- |
9 |
> xmpp/jabber: ladislav.laska@××××××.cz |
10 |
> |
11 |
> |
12 |
> |
13 |
> On Sat, Feb 20, 2010 at 11:02 AM, Martin von Gagern |
14 |
> <Martin.vGagern@×××.net> wrote: |
15 |
> |
16 |
>> Hi there! |
17 |
>> |
18 |
>> On 19.02.2010 22:23, Ladislav Laska wrote: |
19 |
>> |
20 |
>>> Hello again, |
21 |
>>> |
22 |
>>> I have decided to continue discussion in new thread. This discussion |
23 |
>>> was started in thread "kde-sunset: kdepim-kresources broken". |
24 |
>>> |
25 |
>>> I have replaced my code with what I originally intended (the code in |
26 |
>>> git is wrong, since I made a mistake editing it - here is what I |
27 |
>>> intended): |
28 |
>>> |
29 |
>>> # Check for PATCHES in EAPI=0|1 |
30 |
>>> case ${EAPI:-0} in |
31 |
>>> 0|1) |
32 |
>>> if [[ -n ${PATCHES} ]] && [[ -d "${KDE_S}" ]]; then |
33 |
>>> base_src_prepare |
34 |
>>> fi |
35 |
>>> ;; |
36 |
>>> esac |
37 |
>>> |
38 |
>>> Look, for example, at kde-base/ark ebuild. There is a patch, but it's |
39 |
>>> not applied correctly without my code. |
40 |
>>> |
41 |
>> media-gfx/gwenview-1.4.2-r3, on the other hand, would try applying |
42 |
>> patches twice /with/ your code. |
43 |
>> |
44 |
>> |
45 |
>>> What I'm worried about is the check [[ -d "${KDE_S}" ]] makes sure, |
46 |
>>> that this code is called if |
47 |
>>> |
48 |
>>> [[ -d "${KDE_S}" ]] || base_src_unpack unpack |
49 |
>>> |
50 |
>>> did not called base-src_unpack and therefore did not applied patches. |
51 |
>>> |
52 |
>>> There are two problems with EAPI=0|1 |
53 |
>>> |
54 |
>>> 1) It depends on file naming and will not work if base_src_unpack |
55 |
>>> unpacks into $KDE_S |
56 |
>>> |
57 |
>> You mean kde-meta_src_unpack does unpack into $KDE_S, right? |
58 |
>> |
59 |
>> I just had a look. For kde-base/ark, kde-meta_src_unpack does unpack |
60 |
>> part of the tarball, therefore kde_src_unpack won't call |
61 |
>> base_src_unpack, therefore base_src_prepare won't get called either. |
62 |
>> |
63 |
>> |
64 |
>>> 2) Even if base_src_unpack calls base_src_prepare, we're adding |
65 |
>>> patches automatically after this call, but they will not be applied. |
66 |
>>> |
67 |
>> You're right, there is code collecting additional patches from $PATCHDIR |
68 |
>> into the $PATCHES array. So we need to call base_src_prepare /after/ |
69 |
>> that, while the current base_src_unpack call comes before that, and |
70 |
>> unpacking has to come before that as $PATCHDIR is unpacked as well. |
71 |
>> |
72 |
>> As base_src_unpack calls base_src_prepare unconditionally for recent |
73 |
>> incarnations of base.eclass, I feel we cannot call base_src_unpack at |
74 |
>> all. Instead we should simply call "unpack ${A}" directly, and |
75 |
>> base_src_prepare later on. |
76 |
>> |
77 |
>> I feel that this code collecting and applying $PATCHES would be better |
78 |
>> suited to a kde_src_prepare than kde_src_unpack, but I'm not sure it's |
79 |
>> worth refactoring kde.eclass. |
80 |
>> |
81 |
>> |
82 |
>>> Since I can't think of correct check, please let me know if you have |
83 |
>>> an idea. Also, let me know if I'm wrong about something and it's not |
84 |
>>> needed at all. (but I doubt that, because ark, as mentioned above, is |
85 |
>>> counterexample) |
86 |
>>> |
87 |
>> No, you are correct in diagnosing the problem. I just had another stab |
88 |
>> at a solution. Have a look at 5979aefafa6e200a09d5dd7b3a6e99b3e0a9d74e |
89 |
>> and see if you find any package where that approach doesn't work. |
90 |
>> |
91 |
>> Greetings, |
92 |
>> Martin |
93 |
>> |
94 |
|
95 |
I also tested the specific packages in question, and here's what I found: |
96 |
|
97 |
kde-base/ark-3.5.10 |
98 |
* inherit kde-meta |
99 |
* EAPI=1 works |
100 |
|
101 |
kde-base/kdepim-kresources-3.5.10 |
102 |
* inherit kde-meta eutils |
103 |
* requires EAPI=1 (more details below) |
104 |
|
105 |
kde-base/kicker-3.5.10-r2 |
106 |
* inherit kde-meta eutils |
107 |
* EAPI=1 works |
108 |
* EAPI=2 works |
109 |
|
110 |
media-gfx/gwenview-1.4.2-r3 |
111 |
* inherit kde |
112 |
* EAPI=1 works |
113 |
* EAPI=2 works |
114 |
|
115 |
|
116 |
As a more comprehensive test, I rebuilt everything I had in |
117 |
kde-sunset[1]. Everything regarding PATCHES worked great! However, I |
118 |
had to make three changes to individual ebuilds: |
119 |
|
120 |
1. Had to remove x11-libs/qt/qt-3.3.8-libpng14.patch because it was not |
121 |
in the Manifest |
122 |
2. Had to modify app-text/poppler/poppler-0.12.3-r3.ebuild as described |
123 |
here: http://forums.gentoo.org/viewtopic-p-6170313.html#6170313 |
124 |
3. Had to revert kde-base/kdepim-kresources-3.5.10.ebuild back to EAPI=1 |
125 |
|
126 |
I've attached a log for the failed EAPI=2 build in #3. |
127 |
|
128 |
[1] eix --installed-from-overlay kde-sunset --pure-packages --format |
129 |
'<=emptyinstalled>' | xargs emerge -1 |
130 |
|
131 |
|
132 |
-- Chris |