change log for rtems-tools (2011-06-11)

rtems-vc at rtems.org rtems-vc at rtems.org
Sat Jun 11 09:12:13 UTC 2011


 *ccj*:
2011-06-09      Chris Johns <chrisj at rtems.org>

        * specbuilder/specbuilder/build.py,
        specbuilder/specbuilder/crossgcc.py,
        specbuilder/specbuilder/defaults.py,
        specbuilder/specbuilder/linux.py,
        specbuilder/specbuilder/spec.py: Add CentOS support for older
        Pythons. Add options to build the tools with specific flags.

M    1.9  ChangeLog
M    1.4  specbuilder/specbuilder/build.py
M    1.3  specbuilder/specbuilder/crossgcc.py
M    1.8  specbuilder/specbuilder/defaults.py
M    1.2  specbuilder/specbuilder/linux.py
M    1.4  specbuilder/specbuilder/spec.py

diff -u rtems-tools/ChangeLog:1.8 rtems-tools/ChangeLog:1.9
--- rtems-tools/ChangeLog:1.8	Mon Feb 21 21:46:44 2011
+++ rtems-tools/ChangeLog	Thu Jun  9 00:59:32 2011
@@ -1,3 +1,12 @@
+2011-06-09	Chris Johns <chrisj at rtems.org>
+
+	* specbuilder/specbuilder/build.py,
+	specbuilder/specbuilder/crossgcc.py,
+	specbuilder/specbuilder/defaults.py,
+	specbuilder/specbuilder/linux.py,
+	specbuilder/specbuilder/spec.py: Add CentOS support for older
+	Pythons. Add options to build the tools with specific flags.
+
 2011-02-22	Chris Johns <chrisj at rtems.org>
 
 	* specbuilder/sb-versions, specbuilder/specbuilder/version.py:

diff -u rtems-tools/specbuilder/specbuilder/build.py:1.3 rtems-tools/specbuilder/specbuilder/build.py:1.4
--- rtems-tools/specbuilder/specbuilder/build.py:1.3	Mon Feb 21 21:46:44 2011
+++ rtems-tools/specbuilder/specbuilder/build.py	Thu Jun  9 00:59:32 2011
@@ -84,9 +84,12 @@
                          stat.S_IROTH | stat.S_IXOTH)
         except IOError, err:
             raise error.general('creating script: ' + name)
-        finally:
+        except:
             if s is not None:
                 s.close()
+            raise
+        if s is not None:
+            s.close()
 
 class build:
     """Build a package given a spec file."""
@@ -132,7 +135,7 @@
                 for base in url_bases:
                     if base[-1:] != '/':
                         base += '/'
-                    url_path = urlparse.urlsplit(url).path
+                    url_path = urlparse.urlsplit(url)[2]
                     slash = url_path.rfind('/')
                     if slash < 0:
                         url_file = url_path
@@ -155,9 +158,12 @@
                         if os.path.exists(local):
                             os.remove(local)
                         failed = True
-                    finally:
+                    except:
                         if _out is not None:
                             _out.close()
+                        raise
+                    if _out is not None:
+                        _out.close()
                     if _in is not None:
                         del _in
                     if not failed:

diff -u rtems-tools/specbuilder/specbuilder/crossgcc.py:1.2 rtems-tools/specbuilder/specbuilder/crossgcc.py:1.3
--- rtems-tools/specbuilder/specbuilder/crossgcc.py:1.2	Mon Feb 21 21:46:44 2011
+++ rtems-tools/specbuilder/specbuilder/crossgcc.py	Thu Jun  9 00:59:32 2011
@@ -86,7 +86,8 @@
 
     def every_package(self, _build, path):
         self.copy(_build.spec.abspath('%{buildroot}'), path)
-        _build.cleanup()
+        if not self.opts.no_clean():
+            _build.cleanup()
 
     def last_package(self, _build, path):
         tar = os.path.join('%{_rpmdir}', self.arch + '-tools.tar.bz2')
@@ -129,8 +130,10 @@
                 if s == len(arch_specs) - 1:
                     self.last_package(b, path)
                 del b
-        finally:
+        except:
             os.environ['PATH'] = current_path
+            raise
+        os.environ['PATH'] = current_path
 
 def run():
     import sys

diff -u rtems-tools/specbuilder/specbuilder/defaults.py:1.7 rtems-tools/specbuilder/specbuilder/defaults.py:1.8
--- rtems-tools/specbuilder/specbuilder/defaults.py:1.7	Mon Feb 21 21:46:44 2011
+++ rtems-tools/specbuilder/specbuilder/defaults.py	Thu Jun  9 00:59:32 2011
@@ -75,6 +75,9 @@
 %{?buildroot:RPM_BUILD_ROOT="%{buildroot}"}
 export RPM_BUILD_ROOT
 %{?_javaclasspath:CLASSPATH="%{_javaclasspath}"; export CLASSPATH}
+%{?_targetcflags:CFLAGS_FOR_TARGET="%{_targetcflags}"}
+%{?_targetcxxflags:CXXFLAGS_FOR_TARGET="%{_targetcxxflags}"}
+export CFLAGS_FOR_TARGET
 LANG=C
 export LANG
 unset DISPLAY || :
@@ -184,17 +187,20 @@
                   'no-smp'   : '0',
                   'rebuild'  : '0' }
 
-    _long_opts = { '--prefix'     : '_prefix',
-                   '--prefixbase' : '_prefixbase',
-                   '--topdir'     : '_topdir',
-                   '--specdir'    : '_specdir',
-                   '--builddir'   : '_builddir',
-                   '--sourcedir'  : '_sourcedir',
-                   '--usrlibrpm'  : '_usrlibrpm',
-                   '--tmppath'    : '_tmppath',
-                   '--log'        : '_logfile',
-                   '--url'        : '_url_base',
-                   '--rtems'      : '_rtemssrc' }
+    _long_opts = { '--prefix'         : '_prefix',
+                   '--prefixbase'     : '_prefixbase',
+                   '--topdir'         : '_topdir',
+                   '--specdir'        : '_specdir',
+                   '--builddir'       : '_builddir',
+                   '--sourcedir'      : '_sourcedir',
+                   '--usrlibrpm'      : '_usrlibrpm',
+                   '--tmppath'        : '_tmppath',
+                   '--log'            : '_logfile',
+                   '--url'            : '_url_base',
+                   '--rtems'          : '_rtemssrc',
+                   '--targetcflags'   : '_targetcflags',
+                   '--targetcxxflags' : '_targetcxxflags',
+                   '--libstdcxxflags' : '_libstdcxxflags' }
 
     _long_true_opts = { '--trace'    : '_trace',
                         '--dry-run'  : '_dry_run',

diff -u rtems-tools/specbuilder/specbuilder/linux.py:1.1 rtems-tools/specbuilder/specbuilder/linux.py:1.2
--- rtems-tools/specbuilder/specbuilder/linux.py:1.1	Mon Aug 30 19:58:45 2010
+++ rtems-tools/specbuilder/specbuilder/linux.py	Thu Jun  9 00:59:32 2011
@@ -42,7 +42,7 @@
         for l in output.split('\n'):
             count = l.split(':')[1].strip()
             if count > cpus:
-                cpus = count
+                cpus = int(count)
         if cpus > 0:
             smp_mflags = '-j%d' % (cpus) 
     defines = { 
@@ -57,7 +57,7 @@
         '_var':                    '/usr/var',
         'optflags':                '-O2 -fasynchronous-unwind-tables',
         '_smp_mflags':             smp_mflags,
-        '__bzip2':                 '/bin/bzip2',
+        '__bzip2':                 '/usr/bin/bzip2',
         '__gzip':                  '/bin/gzip',
         '__tar':                   '/bin/tar'
         }

diff -u rtems-tools/specbuilder/specbuilder/spec.py:1.3 rtems-tools/specbuilder/specbuilder/spec.py:1.4
--- rtems-tools/specbuilder/specbuilder/spec.py:1.3	Mon Feb 21 21:46:44 2011
+++ rtems-tools/specbuilder/specbuilder/spec.py	Thu Jun  9 00:59:32 2011
@@ -717,8 +717,10 @@
                 else:
                     self._error("invalid parse state: '" + r[0] + "'")
             self._directive_extend(dir, data)
-        finally:
+        except:
             spec.close()
+            raise
+        spec.close()
 
     def define(self, name):
         if name.lower() in self.defines:



--

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/20110611/54ec79ab/attachment.html>


More information about the vc mailing list