From: Alexandre Rostovtsev <tetromino@gentoo.org>
To: Gentoo Dev <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] gnome2-utils.eclass: updated DISABLE_DEPRECATED fix
Date: Sat, 27 Oct 2012 18:44:12 -0400 [thread overview]
Message-ID: <1351377852.12994.13.camel@rook> (raw)
The recently added gnome2_disable_deprecation_warning() unfortunately
triggered maintainer mode and undesirable autoreconf for some packages
like file-roller, leading to build failure (see bug #439602); the
problem had been caused by configure.ac having a higher mtime than
aclocal.m4 and config.h.in.
To prevent the bug, gnome2_disable_deprecation_warning() currently no
longer modifies configure.ac, but it would be desirable to bring back
that functionality. The patch below does so.
People who are well-versed in autotools internals, please review whether
this approach is sane and sufficient.
--- gnome2-utils.eclass 27 Oct 2012 22:24:10 -0000 1.31
+++ gnome2-utils.eclass 27 Oct 2012 22:29:20 -0000
@@ -435,13 +435,22 @@
local makefile
ebegin "Disabling deprecation warnings"
- # The sort is important to ensure .am is listed before the respective .in for
- # maintainer mode regeneration not kicking in due to .am being newer than .in
+ # The sort is important to ensure .am is listed before the respective .in,
+ # and configure.{ac,in} before Makefile.in, to prevent maintainer mode
+ # regeneration from kicking in due to .am being newer than .in
while read makefile ; do
- if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then
- continue
- fi
+ if [[ ${makefile%%aclocal.m4} != ${makefile} ||
+ ${makefile%%config.h.in} != ${makefile} ]]; then
+ # To avoid maintainer mode, aclocal.m4/config.h.in need to have
+ # mtime after configure.ac and Makefile.am, but before configure
+ # and Makefile.in
+ debug-print "Touching ${makefile}"
+ touch "${makefile}" && continue
+ elif ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then
+ continue
+ fi
+ debug-print "Disabling deprecation warnings in ${makefile}"
LC_ALL=C sed -r -i \
-e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \
-e 's:-DGSEAL_ENABLE:$(NULL):g' \
@@ -452,12 +461,10 @@
fails+=( "${makefile}" )
retval=2
fi
- done < <(find "${S}" -name "Makefile.in" \
- -o -name "Makefile.am" -o -name "Makefile.decl" \
- | sort; echo configure)
-# TODO: sedding configure.ac can trigger maintainer mode; bug #439602
-# -o -name "configure.ac" -o -name "configure.in" \
-# | sort; echo configure)
+ done < <(find "${S}" -name "Makefile.am" -o -name "Makefile.decl" \
+ -o -name "configure.ac" -o -name "configure.in"; \
+ find "${S}" -name "aclocal.m4" -o -name "config.h.in"; \
+ find "${S}" -name "configure" -o -name "Makefile.in")
eend ${retval}
for makefile in "${fails[@]}" ; do
next reply other threads:[~2012-10-27 22:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-27 22:44 Alexandre Rostovtsev [this message]
2012-10-28 1:19 ` [gentoo-dev] gnome2-utils.eclass: updated DISABLE_DEPRECATED fix Alexandre Rostovtsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351377852.12994.13.camel@rook \
--to=tetromino@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox