[Erp5-report] r28860 - /erp5/trunk/products/ERP5/bin/genbt5list

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 7 17:59:45 CEST 2009


Author: kazuhiko
Date: Mon Sep  7 17:59:44 2009
New Revision: 28860

URL: http://svn.erp5.org?rev=28860&view=rev
Log:
* chmod bt5list according to umask.
* check if python version is good or not.

Modified:
    erp5/trunk/products/ERP5/bin/genbt5list

Modified: erp5/trunk/products/ERP5/bin/genbt5list
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bin/genbt5list?rev=28860&r1=28859&r2=28860&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bin/genbt5list [utf8] (original)
+++ erp5/trunk/products/ERP5/bin/genbt5list [utf8] Mon Sep  7 17:59:44 2009
@@ -1,4 +1,4 @@
-#! /usr/bin/python2.5
+#! /usr/bin/python
 ##############################################################################
 #
 # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
@@ -103,6 +103,10 @@
   os.write(fd, '</repository>\n')
 
 def main():
+  if sys.version < '2.5':
+    print "Python 2.4's tarfile.py has a bug that causes a broken bt5list."
+    print "Please use Python 2.5 or later for this script."
+    sys.exit(1)
   if len(sys.argv) < 2:
     dir_list = ['.']
   else:
@@ -122,6 +126,9 @@
       raise
     else:
       shutil.move(path, 'bt5list')
+      cur_umask = os.umask(0666)
+      os.chmod('bt5list', 0666 - cur_umask)
+      os.umask(cur_umask)
     os.chdir(cwd)
 
 main()




More information about the Erp5-report mailing list