1 |
The recently added gnome2_disable_deprecation_warning() unfortunately |
2 |
triggered maintainer mode and undesirable autoreconf for some packages |
3 |
like file-roller, leading to build failure (see bug #439602); the |
4 |
problem had been caused by configure.ac having a higher mtime than |
5 |
aclocal.m4 and config.h.in. |
6 |
|
7 |
To prevent the bug, gnome2_disable_deprecation_warning() currently no |
8 |
longer modifies configure.ac, but it would be desirable to bring back |
9 |
that functionality. The patch below does so. |
10 |
|
11 |
People who are well-versed in autotools internals, please review whether |
12 |
this approach is sane and sufficient. |
13 |
|
14 |
--- gnome2-utils.eclass 27 Oct 2012 22:24:10 -0000 1.31 |
15 |
+++ gnome2-utils.eclass 27 Oct 2012 22:29:20 -0000 |
16 |
@@ -435,13 +435,22 @@ |
17 |
local makefile |
18 |
|
19 |
ebegin "Disabling deprecation warnings" |
20 |
- # The sort is important to ensure .am is listed before the respective .in for |
21 |
- # maintainer mode regeneration not kicking in due to .am being newer than .in |
22 |
+ # The sort is important to ensure .am is listed before the respective .in, |
23 |
+ # and configure.{ac,in} before Makefile.in, to prevent maintainer mode |
24 |
+ # regeneration from kicking in due to .am being newer than .in |
25 |
while read makefile ; do |
26 |
- if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then |
27 |
- continue |
28 |
- fi |
29 |
+ if [[ ${makefile%%aclocal.m4} != ${makefile} || |
30 |
+ ${makefile%%config.h.in} != ${makefile} ]]; then |
31 |
+ # To avoid maintainer mode, aclocal.m4/config.h.in need to have |
32 |
+ # mtime after configure.ac and Makefile.am, but before configure |
33 |
+ # and Makefile.in |
34 |
+ debug-print "Touching ${makefile}" |
35 |
+ touch "${makefile}" && continue |
36 |
+ elif ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then |
37 |
+ continue |
38 |
+ fi |
39 |
|
40 |
+ debug-print "Disabling deprecation warnings in ${makefile}" |
41 |
LC_ALL=C sed -r -i \ |
42 |
-e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \ |
43 |
-e 's:-DGSEAL_ENABLE:$(NULL):g' \ |
44 |
@@ -452,12 +461,10 @@ |
45 |
fails+=( "${makefile}" ) |
46 |
retval=2 |
47 |
fi |
48 |
- done < <(find "${S}" -name "Makefile.in" \ |
49 |
- -o -name "Makefile.am" -o -name "Makefile.decl" \ |
50 |
- | sort; echo configure) |
51 |
-# TODO: sedding configure.ac can trigger maintainer mode; bug #439602 |
52 |
-# -o -name "configure.ac" -o -name "configure.in" \ |
53 |
-# | sort; echo configure) |
54 |
+ done < <(find "${S}" -name "Makefile.am" -o -name "Makefile.decl" \ |
55 |
+ -o -name "configure.ac" -o -name "configure.in"; \ |
56 |
+ find "${S}" -name "aclocal.m4" -o -name "config.h.in"; \ |
57 |
+ find "${S}" -name "configure" -o -name "Makefile.in") |
58 |
eend ${retval} |
59 |
|
60 |
for makefile in "${fails[@]}" ; do |