1 |
On 12:57 Fri 06 Mar , Donnie Berkholz wrote: |
2 |
> I decided to try something a little different because I had some ideas |
3 |
> for improving the existing EAPI patches I've seen going into other |
4 |
> eclasses. So here is my patch for x-modular.eclass. I tested it with |
5 |
> ebuilds using EAPIs 0, 1, and 2, and it appeared to work fine. It |
6 |
> already happened to have a function called src_configure, so that |
7 |
> doesn't appear in the patch. |
8 |
|
9 |
FYI, using EXPORT_FUNCTIONS before inherit, as this patch caused |
10 |
x-modular.eclass to do, is broken in current portage releases. Zac said |
11 |
he would change this to be consistent with the lack of any ordering |
12 |
restriction in the PMS. Thanks to Tomáš Chvátal for tracking down this |
13 |
tricky bug! |
14 |
|
15 |
I ran a quick check across everything in the tree and was happy to see |
16 |
nothing doing this besides my eclass patch. Here's the scriptlet I used: |
17 |
|
18 |
for i in /usr/portage/eclass/*; do |
19 |
grep -q EXPORT_FUNCTIONS $i || continue |
20 |
grep -q inherit $i || continue |
21 |
LINE1=$(grep -n EXPORT_FUNCTIONS $i | grep -v ':#' | cut -d: -f1 | head -n1) |
22 |
LINE2=$(grep -n inherit $i | grep -v ':#' | cut -d: -f1 | tail -n1) |
23 |
if [[ $LINE1 -lt $LINE2 ]]; then |
24 |
echo $i $LINE1 $LINE2 |
25 |
fi |
26 |
done |
27 |
|
28 |
Manual checking of the two results showed false positives. |
29 |
|
30 |
-- |
31 |
Thanks, |
32 |
Donnie |
33 |
|
34 |
Donnie Berkholz |
35 |
Developer, Gentoo Linux |
36 |
Blog: http://dberkholz.wordpress.com |