]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
verify tarballs have been deleted
authorMathias Klette <mathias.klette@profitbricks.com>
Wed, 16 May 2012 13:16:06 +0000 (15:16 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Wed, 16 May 2012 13:16:06 +0000 (15:16 +0200)
debian_build.py

index 2b787b8c27698ba3ed11fbd42b24d09ddf46d2d7..cce7a2e08f4715f8efc2a792ae2539827dfb10c4 100755 (executable)
@@ -428,8 +428,9 @@ if __name__ == '__main__':
 
     # cleanup existing *orig.tar.gz
     if os.path.isdir('../build-area/'):
-        files = " ".join(fnmatch.filter(os.listdir('../build-area/'),'*.orig.tar.gz'))
-        cmd = [BIN_SUDO, BIN_RM, '-f', files]
+        files = fnmatch.filter(os.listdir('../build-area/'),'*.orig.tar.gz')
+        logger.debug('Previous upstream tarball(s) found: %s' %( files ))
+        cmd = [BIN_SUDO, BIN_RM, '-f', " ".join(files)]
         cmdobj = subprocess.Popen(
                 cmd,
                 shell=False,
@@ -440,11 +441,7 @@ if __name__ == '__main__':
                 env={'':''}
         )
     
-        logger.debug(
-                'Trying to call "%s"'
-                %(' '.join(cmd))
-        )
-    
+        logger.debug('Calling "%s" ..' %(' '.join(cmd)))
         ret = cmdobj.wait()
         if ret:
             _str = (
@@ -454,6 +451,9 @@ if __name__ == '__main__':
             logger.debug(_str)
             raise Exception(_str)
 
+        files = fnmatch.filter(os.listdir('../build-area/'),'*.orig.tar.gz')
+        logger.debug('Previous upstream tarball(s) found: %s' %( files ))
+
 
     logger.info('dist: %s' %(pb_suite))
     cmd = ['figlet-figlet', '-t', 'dist: %s' %(pb_suite)]