change log for rtems-tools (2010-08-13)
rtems-vc at rtems.org
rtems-vc at rtems.org
Fri Aug 13 05:19:40 UTC 2010
*ccj*:
2010-08-13 Chris Johns <chrisj at rtems.org>
* specbuilder/specbuilder/defaults.py: Provide a default shell.
* specbuilder/specbuilder/rtems.py: Provide a default autoconf
version.
* specbuilder/specbuilder/setup.py: Use the default setup shell
and check the version of autoconf needed.
M 1.5 ChangeLog
M 1.4 specbuilder/specbuilder/defaults.py
M 1.2 specbuilder/specbuilder/rtems.py
M 1.5 specbuilder/specbuilder/setup.py
diff -u rtems-tools/ChangeLog:1.4 rtems-tools/ChangeLog:1.5
--- rtems-tools/ChangeLog:1.4 Thu Aug 12 17:40:57 2010
+++ rtems-tools/ChangeLog Thu Aug 12 23:40:44 2010
@@ -1,5 +1,15 @@
2010-08-13 Chris Johns <chrisj at rtems.org>
+ * specbuilder/specbuilder/defaults.py: Provide a default shell.
+
+ * specbuilder/specbuilder/rtems.py: Provide a default autoconf
+ version.
+
+ * specbuilder/specbuilder/setup.py: Use the default setup shell
+ and check the version of autoconf needed.
+
+2010-08-13 Chris Johns <chrisj at rtems.org>
+
* specbuilder/specbuilder/setup.py: Add import for execute.
2010-08-13 Chris Johns <chrisj at rtems.org>
diff -u rtems-tools/specbuilder/specbuilder/defaults.py:1.3 rtems-tools/specbuilder/specbuilder/defaults.py:1.4
--- rtems-tools/specbuilder/specbuilder/defaults.py:1.3 Thu Aug 12 16:09:55 2010
+++ rtems-tools/specbuilder/specbuilder/defaults.py Thu Aug 12 23:40:44 2010
@@ -84,6 +84,7 @@
'___build_template': '''#!%{___build_shell}
%{___build_pre}
%{nil}''',
+'___setup_shell': '/bin/sh',
'__aclocal': 'aclocal',
'__ar': 'ar',
'__arch_install_post': '%{nil}',
diff -u rtems-tools/specbuilder/specbuilder/rtems.py:1.1 rtems-tools/specbuilder/specbuilder/rtems.py:1.2
--- rtems-tools/specbuilder/specbuilder/rtems.py:1.1 Thu Aug 12 16:09:55 2010
+++ rtems-tools/specbuilder/specbuilder/rtems.py Thu Aug 12 23:40:44 2010
@@ -36,6 +36,7 @@
'mpfr_provided': '0',
'gmp_provided': '0',
'libelf_provided': '0',
+ '__setup_autoconf': '2.65'
}
return defines
diff -u rtems-tools/specbuilder/specbuilder/setup.py:1.4 rtems-tools/specbuilder/specbuilder/setup.py:1.5
--- rtems-tools/specbuilder/specbuilder/setup.py:1.4 Thu Aug 12 17:40:57 2010
+++ rtems-tools/specbuilder/specbuilder/setup.py Thu Aug 12 23:40:44 2010
@@ -86,20 +86,33 @@
filelist.append(os.path.join(root, f))
return filelist
- def get_specs(self, path):
- return self._get_file_list(path, 'rtems', 'spec')
-
- def get_patches(self, path):
- return self._get_file_list(path, 'patches', 'diff')
-
def run(self, command, shell_opts = '', cwd = None):
e = execute.capture_execution(log = log.default, dump = self.opts.quiet())
- cmd = self.opts.expand('%{___build_shell} -ex ' + shell_opts + ' ' + command, self.defaults)
+ cmd = self.opts.expand('%{__setup_shell} -ex ' + shell_opts + ' ' + command, self.defaults)
self._output('run: ' + cmd)
exit_code, proc, output = e.shell(cmd, cwd = cwd)
if exit_code != 0:
raise error.general('shell cmd failed: ' + cmd)
+ def check_version(self, cmd, macro):
+ vcmd = cmd + ' --version'
+ e = execute.capture_execution()
+ exit_code, proc, output = e.shell(vcmd)
+ if exit_code != 0 and len(output) != 0:
+ raise error.general('shell cmd failed: ' + vcmd)
+ version = output.split('\n')[0].split(' ')
+ need = self.opts.expand(macro, self.defaults)
+ if version < need:
+ _notice(self.opts, 'warning: ' + cmd + ' version is invalid, need ' + need + ' or higher')
+ return False
+ return True
+
+ def get_specs(self, path):
+ return self._get_file_list(path, 'rtems', 'spec')
+
+ def get_patches(self, path):
+ return self._get_file_list(path, 'patches', 'diff')
+
def mkdir(self, path):
if not self.opts.dry_run():
self._output('making dir: ' + path)
@@ -129,9 +142,10 @@
if not os.path.isdir(crossrpms):
raise error.general('no crossrpms directory found under: ' + crossrpms)
if 'rebuild' in self.opts.opts:
- self.run('../../bootstrap -c', '-c', crossrpms)
- self.run('../../bootstrap', '-c', crossrpms)
- self.run('./configure', '-c', crossrpms)
+ if self.check_version('autoconf', '%{__setup_autoconf}'):
+ self.run('../../bootstrap -c', '-c', crossrpms)
+ self.run('../../bootstrap', '-c', crossrpms)
+ self.run('./configure', '-c', crossrpms)
self._install_files(self.get_specs(crossrpms), os.path.join(path, 'SPECS'))
self._install_files(self.get_patches(crossrpms), os.path.join(path, 'SOURCES'))
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100813/a4511946/attachment.html>
More information about the vc
mailing list