Moises Henriquez committed 81baea7

Delayed source type detection until after the job starts. This keeps the GUI from lagging when adding large jobs to the queue

Comments (0)

Files changed (2)


         self.parent = parent
     def _get_next_job(self):
+        ''' Get the next job in line from the database '''
         return dbutils.GetNextJob()
-        db = sqlite3.connect('/tmp/vpackager.db')
-        c = db.cursor()
-        c.execute('select * from queue')
-        ret =
-        c.close()
-        return ret
     def _log_job_start(self, _id):
+        ''' Log the job start to the database history'''
         return dbutils.LogJobStart(_id)
     def _log_job_end(self, _id, stdoutpath, result):
+        ''' Log the job end to the database history'''
         return dbutils.LogJobEnd(_id, stdoutpath, result)
     def _refresh_views(self):
+        ''' Refresh the screens that show the database status '''


                 'package_%s-%s'% (, self.ver))
         self.__dump = []
-        self.builder = self.FindSourceType()
+        #self.builder = self.FindSourceType()
     def install_pkg(self):
         fullpath = glob.glob(os.path.join(
         ### The only diff from using this vs sbbuilder itself is that
         ### This app can guess what type of slackbuild needs to be
         ### created for the app to build.
+        if not self.builder:
+            self.builder = self.FindSourceType()
         """ Internal method to collect a list of the contents of the tarball"""
-    def FindSourceType(self):
+    def _FindSourceType(self):
         """ Determine what type of slackbuild we need to generate for this
         application to build."""
         cmd = 'tar -tf %s'% self.path
         elif '' in self.__dump:
             self.builder = 'default'
         elif 'Makefile' in self.__dump:
-            self.builder = 'default'
+            #FIXME: sbbuilder needs to accomodate sources with Makefile only
+            self.builder = '--noconfig'
         elif 'CMakeLists.txt' in self.__dump:
             self.builder = 'cmake'
         elif '' in self.__dump: