Index: cmtpacman/HEAD/scripts/kit.py
===================================================================
--- cmtpacman/HEAD/scripts/kit.py	(revision 60)
+++ cmtpacman/HEAD/scripts/kit.py	(revision 61)
@@ -23,4 +23,6 @@
 import signal
 import tarfile
+import logging
+import commands
 
 from   cmt import *
@@ -42,5 +44,6 @@
         hdlr.setFormatter(fmt)
         self.log.addHandler(hdlr)
-
+        
+        self.log.info(time.strftime ('%c'))
         # Default options 
         self.here               = os.getcwd()
@@ -133,4 +136,5 @@
         # Prepare temporary file management
         self.log.debug('CMT %s', str(os.getpid ()))
+        self.tempprefix = "/tmp/CMT"
         self.log.debug('temprefix=%s', self.tempprefix)
         self.tempfile1          = os.path.join (self.tempprefix, 't')
@@ -139,5 +143,6 @@
         self.tempcmtusercontext = os.path.join (self.tempprefix, 'd')
         self.cleanup ()
-        os.makedirs (self.tempprefix)
+        if self.tempprefix != '':
+            os.makedirs (self.tempprefix)
 ##################################################################################################            
 #-------------------------------- prepare_cmt_context -------------------------------------------#
@@ -228,5 +233,7 @@
     def prepare_temp (self):
         # Prepare the temporary copies
+        
         os.makedirs (self.tempcopydir)
+        
         copycmd = 'ln -s'
         
@@ -244,5 +251,6 @@
 ##################################################################################################
     def build_pacman (self):
-        print self.url, self.package, self.version, self.cmtpath, self.project_id, self.is_internal
+        self.log.debug("%s %s %s %s %s %s", self.url, self.package, self.version, self.cmtpath, \
+                       self.project_id, self.is_internal)
         self.source = '../kits'
         # External packages (those with export_paths) are split into two kits:
@@ -266,5 +274,5 @@
             self.pacman_filename = self.download_filename + '.pacman'
             
-            print 'build_pacman> Create pacman file for external stuff ' + self.pacman_filename
+            self.log.info ('build_pacman> Create pacman file for external stuff %s', self.pacman_filename)
             file = os.path.join (self.cache_dir, self.pacman_filename)
             self.pacman_file_version = self.get_pacman_file_version (file)
@@ -276,4 +284,5 @@
             
         # write pacman file
+        self.log.debug ('write pacman file')
         f = open (file, 'w+')
         
@@ -286,4 +295,5 @@
         f.write (content)
         f.close()
+        self.log.debug ('close file')
         
     # Figure out dependencies from CMT.
@@ -308,5 +318,6 @@
         if self.project_id == "":
             self.release_id=self.release
-            vv=os.system("`echo "+self.version+" | sed -e 's#'^"+self.package+"-'##'`")
+            cmd = "`echo "+self.version+" | sed -e 's#'^"+self.package+"-'##'`"
+            status, vv= commands.getstatusoutput(cmd)
         else:
             self.release_id=self.project_id
@@ -322,10 +333,10 @@
                 self.project_dep = "CMTCONFIG-"+self.cmtversion+self.platform_suffix
    
-        self.depends="package ('"+str(self.project_dep)+"')"
-        first=True
-        for f in self.depsv:
-            p=os.system  ("`echo "+f+" | cut -d: -f1`")
-            v=os.system  ("`echo "+f+" | cut -d: -f2`")
-            pp=os.system ("`echo "+f+" | cut -d: -f3 | sed -e 's#/$##'`")
+            self.depends="package ('"+str(self.project_dep)+"')"
+            first=True
+            for f in self.depsv:
+                p=os.system  ("`echo "+f+" | cut -d: -f1`")
+                v=os.system  ("`echo "+f+" | cut -d: -f2`")
+                pp=os.system ("`echo "+f+" | cut -d: -f3 | sed -e 's#/$##'`")
 
         # end build_pacman        
@@ -456,5 +467,5 @@
         if self.debug:
             tarball = tarfile.open (name=name , mode='r:gz')
-            self.log.debug('tar ball content:%s', str(tarball.list ())
+            self.log.debug('tar ball content:%s', str(tarball.list ()))
             tarball.close ()
 ##################################################################################################
@@ -464,5 +475,5 @@
         #  Acquire the CMT files (requirements + make_fragments) file
         #  Result is stored (symlinked) in ${tempcopydir}/cmt
-     
+        pass 
 #  echo `pwd` >${tempfile1}
 #  if test -d ../fragments; then
@@ -500,9 +511,9 @@
 #---------------------------------- transfer_files ----------------------------------------------#
 ##################################################################################################
-    def transfer_files (self, kind, list, branch):
-        alt=
-        dir_prefix=
-
-        if os.path.isfile(list): return 
+    def transfer_files (self, kind, liste, branch):
+        alt       = ""
+        dir_prefix= ""
+
+        if os.path.isfile(liste): return 
 #        
 #  cmt -quiet filter ${list} ${tempfile2}; mv ${tempfile2} ${list}
