[Checkins] SVN: zc.buildout/branches/2/ Fixed https://bugs.launchpad.net/bugs/697913 : Buildout doesn't honor exit code from scripts.

Hector Edwardo Velade Diaz hvelarde at yahoo.com
Wed Sep 28 12:36:15 EST 2011


Log message for revision 122986:
  Fixed https://bugs.launchpad.net/bugs/697913 : Buildout doesn't honor exit code from scripts.

Changed:
  U   zc.buildout/branches/2/CHANGES.txt
  U   zc.buildout/branches/2/src/zc/buildout/bootstrap.txt
  U   zc.buildout/branches/2/src/zc/buildout/buildout.txt
  U   zc.buildout/branches/2/src/zc/buildout/easy_install.py
  U   zc.buildout/branches/2/src/zc/buildout/easy_install.txt
  U   zc.buildout/branches/2/zc.recipe.egg_/src/zc/recipe/egg/README.txt

-=-
Modified: zc.buildout/branches/2/CHANGES.txt
===================================================================
--- zc.buildout/branches/2/CHANGES.txt	2011-09-28 16:32:37 UTC (rev 122985)
+++ zc.buildout/branches/2/CHANGES.txt	2011-09-28 17:36:15 UTC (rev 122986)
@@ -27,6 +27,9 @@
 - Removed any traces of the implementation of ``extended-by``. Raise a
   UserError if the option is encountered instead of ignoring it, though.
 
+- https://bugs.launchpad.net/bugs/697913 : Buildout doesn't honor exit code
+  from scripts. Fixed.
+
 1.5.2 (2010-10-11)
 ==================
 

Modified: zc.buildout/branches/2/src/zc/buildout/bootstrap.txt
===================================================================
--- zc.buildout/branches/2/src/zc/buildout/bootstrap.txt	2011-09-28 16:32:37 UTC (rev 122985)
+++ zc.buildout/branches/2/src/zc/buildout/bootstrap.txt	2011-09-28 17:36:15 UTC (rev 122986)
@@ -223,7 +223,7 @@
     import zc.buildout.buildout
     <BLANKLINE>
     if __name__ == '__main__':
-        zc.buildout.buildout.main()
+        sys.exit(zc.buildout.buildout.main())
     <BLANKLINE>
 
 Last, the -c option needs to work on bootstrap.py::

Modified: zc.buildout/branches/2/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/2/src/zc/buildout/buildout.txt	2011-09-28 16:32:37 UTC (rev 122985)
+++ zc.buildout/branches/2/src/zc/buildout/buildout.txt	2011-09-28 17:36:15 UTC (rev 122986)
@@ -2464,7 +2464,7 @@
     import zc.buildout.buildout
     <BLANKLINE>
     if __name__ == '__main__':
-        zc.buildout.buildout.main()
+        sys.exit(zc.buildout.buildout.main())
     <BLANKLINE>
 
 

Modified: zc.buildout/branches/2/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/2/src/zc/buildout/easy_install.py	2011-09-28 16:32:37 UTC (rev 122985)
+++ zc.buildout/branches/2/src/zc/buildout/easy_install.py	2011-09-28 17:36:15 UTC (rev 122986)
@@ -1488,7 +1488,7 @@
 import %(module_name)s
 
 if __name__ == '__main__':
-    %(module_name)s.%(attrs)s(%(arguments)s)
+    sys.exit(%(module_name)s.%(attrs)s(%(arguments)s))
 '''
 
 # These are used only by the older ``scripts`` function.

Modified: zc.buildout/branches/2/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/branches/2/src/zc/buildout/easy_install.txt	2011-09-28 16:32:37 UTC (rev 122985)
+++ zc.buildout/branches/2/src/zc/buildout/easy_install.txt	2011-09-28 17:36:15 UTC (rev 122986)
@@ -671,7 +671,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Some things to note:
 
@@ -708,7 +708,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Passing entry-point information directly is handy when using eggs (or
 distributions) that don't declare their entry points, such as
@@ -839,7 +839,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 The ``scripts`` function: Providing script arguments
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -863,7 +863,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main(1, 2)
+        sys.exit(eggrecipedemo.main(1, 2))
 
 The ``scripts`` function: Passing initialization code
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -889,7 +889,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main(1, 2)
+        sys.exit(eggrecipedemo.main(1, 2))
 
 The ``scripts`` function: Relative paths
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -935,7 +935,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Note that the extra path we specified that was outside the directory
 passed as relative_paths wasn't converted to a relative path.
@@ -1515,7 +1515,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
     >>> demo_call = join(interpreter_bin_dir, 'demo')
     >>> if sys.platform == 'win32':
@@ -1561,7 +1561,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main(1, 2)
+        sys.exit(eggrecipedemo.main(1, 2))
 
 Handling custom build options for extensions provided in source distributions
 -----------------------------------------------------------------------------

Modified: zc.buildout/branches/2/zc.recipe.egg_/src/zc/recipe/egg/README.txt
===================================================================
--- zc.buildout/branches/2/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2011-09-28 16:32:37 UTC (rev 122985)
+++ zc.buildout/branches/2/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2011-09-28 17:36:15 UTC (rev 122986)
@@ -382,7 +382,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Relative egg paths
 ------------------
@@ -435,7 +435,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 You can specify relative paths in the buildout section, rather than in
 each individual script section:
@@ -482,7 +482,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main()
+        sys.exit(eggrecipedemo.main())
 
 Specifying initialialization code and arguments
 -----------------------------------------------
@@ -532,7 +532,7 @@
     import eggrecipedemo
     <BLANKLINE>
     if __name__ == '__main__':
-        eggrecipedemo.main(a, 2)
+        sys.exit(eggrecipedemo.main(a, 2))
 
 Here we see that the initialization code we specified was added after
 setting the path.  Note, as mentioned above, that leading whitespace
@@ -587,7 +587,7 @@
     import foo.bar
     <BLANKLINE>
     if __name__ == '__main__':
-        foo.bar.a.b.c()
+        sys.exit(foo.bar.a.b.c())
 
 Generating all scripts
 ----------------------



More information about the checkins mailing list