Source

vpackager / src / vpackager / dbutils.py

Diff from to

File src/vpackager/dbutils.py

         release text,
         type text,
         install text,
+        config_options text,
+        doinstURI text,
         patches text)''')
         db.commit()
 
         cursor.execute('''
         create table history(id integer primary key,
         app text, ver text, srcURI text, descURI text,
-        release text, type text, patches text, buildstart text,
+        release text, type text, config_options text,
+        doinstURI text, patches text, buildstart text,
         buildend text, stdout text, result text)''')
         db.commit()
 
         return self.close()
 
     def NewJob(self, app, ver, srcURI, descURI, release, _type,
-            install, patches):
+            install, config_options, doinstURI, patches):
         """ Add a new job to the job queue"""
-        t = (app, ver, srcURI, descURI, release, _type, install, patches)
+        t = (app, ver, srcURI, descURI, release, _type, install,
+             config_options, doinstURI,patches)
         db, cursor = self._open()
         cursor.execute('''
         insert into queue (app, ver, srcURI, descURI, release, type,
-        install, patches) values (?,?,?,?,?,?,?,?)''', t)
+        install,config_options, doinstURI,
+        patches) values (?,?,?,?,?,?,?,?,?,?)''', t)
         db.commit()
         self.notify(data = self.GetQueue(), group='queue')
         return self.close()
 
     def UpdateJob(self, _id, app, ver, srcURI, descURI, release,
-                  _type, install, patches):
+                  _type, install, config_options, doinstURI, patches):
         """ Update job information on an existing job"""
         db, cursor = self._open()
-        t = (app, ver, srcURI, descURI, release, _type, install, patches, _id)
+        t = (app, ver, srcURI, descURI, release, _type, install,
+             config_options, doinstURI, patches, _id)
         try:
             cursor.execute('''
                 UPDATE queue set app=?, ver=?, srcURI=?, descURI=?,
-                release=?, type=?, install=? ,patches=? WHERE id=?''', t)
+                release=?, type=?, install=? , config_options=?,
+                doinstURI=?, patches=? WHERE id=?''', t)
             db.commit()
             self.notify(self.GetQueue(), group='queue')
         except:
         db, cursor = self._open()
         t = (job_id,)
         cursor.execute('''
-        select id, app, ver, srcURI, descURI, release, type from queue where
-        id=?''',t)
+        select id, app, ver, srcURI, descURI, release, type, config_options,
+        doinstURI from queue where id=?''',t)
         res = cursor.next()
         cursor.execute('''
         insert into history (id, app, ver, srcURI, descURI, release, type,
-        buildstart, result) values (?,?,?,?,?,?,?,CURRENT_TIMESTAMP,
-        'Running')''', res)
+        config_options, doinstURI, buildstart, result)
+        values (?,?,?,?,?,?,?,?,?,CURRENT_TIMESTAMP, 'Running')''', res)
         cursor.execute('delete from queue where id=?', t)
         db.commit()
         # Notify the observers of the changes.
             retval['descURI'] = ret[4]
             retval['release'] = ret[5]
             retval['type'] = ret[6]
-            retval['patches'] = ret[7]
-            retval['buildstart'] = ret[8]
-            retval['buildend'] = ret[9]
-            retval['stdout'] = ret[10]
-            retval['result'] = ret[11]
+            retval['config'] = ret[7]
+            retval['doinstURI'] = ret[8]
+            retval['patches'] = ret[9]
+            retval['buildstart'] = ret[10]
+            retval['buildend'] = ret[11]
+            retval['stdout'] = ret[12]
+            retval['result'] = ret[13]
         else:
             retval = {}
         self.close()
             retval['release'] = ret[5]
             retval['type'] = ret[6]
             retval['install'] = ret[7]
-            retval['patches'] = ret[8]
+            retval['config'] = ret[8]
+            retval['doinstURI'] = ret[9]
+            retval['patches'] = ret[10]
         else:
             retval = None
         self.close()