[jhbuild] sanitycheck: Do not check for old automake versions (GNOME bug 643864)
- From: Craig Keogh <cskeogh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] sanitycheck: Do not check for old automake versions (GNOME bug 643864)
- Date: Sun, 20 Mar 2011 09:08:24 +0000 (UTC)
commit d8b93621377cd53596bf182bce0dfb905f0e5459
Author: Craig Keogh <cskeogh adam com au>
Date: Fri Mar 4 12:37:13 2011 +0000
sanitycheck: Do not check for old automake versions (GNOME bug 643864)
Based on patch by Javier Jardón
jhbuild/commands/sanitycheck.py | 35 ++++++++++++++++-------------------
1 files changed, 16 insertions(+), 19 deletions(-)
---
diff --git a/jhbuild/commands/sanitycheck.py b/jhbuild/commands/sanitycheck.py
index cf40f8b..ee9c272 100644
--- a/jhbuild/commands/sanitycheck.py
+++ b/jhbuild/commands/sanitycheck.py
@@ -23,10 +23,10 @@ import re
from jhbuild.commands import Command, register_command
from jhbuild.utils.cmds import get_output, check_version
-from jhbuild.errors import UsageError, FatalError
+from jhbuild.errors import UsageError, CommandError
-def get_aclocal_path(version):
- data = get_output(['aclocal-%s' % version, '--print-ac-dir'])
+def get_aclocal_path():
+ data = get_output(['aclocal', '--print-ac-dir'])
path = [data[:-1]]
env = os.environ.get('ACLOCAL_FLAGS', '').split()
i = 0
@@ -79,30 +79,27 @@ class cmd_sanitycheck(Command):
if not check_version(['autoconf', '--version'],
r'autoconf \([^)]*\) ([\d.]+)', '2.53'):
uprint(_('%s not found') % 'autoconf >= 2.53')
- if not check_version(['automake-1.8', '--version'],
- r'automake \([^)]*\) ([\d.]+)', '1.8'):
- uprint(_('%s not found') % 'automake-1.8')
- if not check_version(['automake-1.9', '--version'],
- r'automake \([^)]*\) ([\d.]+)', '1.9'):
- uprint(_('%s not found') % 'automake-1.9')
-
- not_in_path = []
- for amver in ('1.8', '1.9'):
- try:
- path = get_aclocal_path(amver)
- except:
- continue # exception raised if aclocal-ver not runnable
+ if not check_version(['automake', '--version'],
+ r'automake \([^)]*\) ([\d.]+)', '1.10'):
+ uprint(_('%s not found') % 'automake >= 1.10')
+
+ try:
+ not_in_path = []
+ path = get_aclocal_path()
macros = ['libtool.m4', 'gettext.m4', 'pkg.m4']
for macro in macros:
if not inpath (macro, path):
- uprint(_("aclocal-%s can't see %s macros") % (amver, macro.split('.m4')[0]))
+ uprint(_("aclocal can't see %s macros") % (macro.split('.m4')[0]))
if not_in_path.count(macro) == 0:
not_in_path.append(macro)
- if len(not_in_path) > 0:
- uprint(_("Please copy the lacking macros (%s) in one of the following paths: %s"
- % (', '.join(not_in_path), ', '.join(path))))
+ if len(not_in_path) > 0:
+ uprint(_("Please copy the lacking macros (%s) in one of the following paths: %s"
+ % (', '.join(not_in_path), ', '.join(path))))
+
+ except CommandError, exc:
+ uprint(str(exc))
# XML catalog sanity checks
if not os.access('/etc/xml/catalog', os.R_OK):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]