Gentoo Archives: gentoo-desktop

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