|
27 | 27 |
|
28 | 28 |
|
29 | 29 | def PACKAGE_DATA_INSERT(cursor, data):
|
30 |
| - cursor.execute('INSERT INTO PACKAGE_DATA VALUES (null,?,?,?,?,?,?,?)', data) |
| 30 | + cursor.execute('INSERT INTO PACKAGE_DATA VALUES (null,?,?,?,?,?,?)', data) |
31 | 31 |
|
32 | 32 |
|
33 | 33 | # create binding with OUTPUT_TYPE - returns ID
|
@@ -81,11 +81,10 @@ def get_yumdb_packages(cursor, yumdb_path, pid_to_pdid, repo_fn):
|
81 | 81 | yumdata[yumfile] = f.read()
|
82 | 82 | pkgs[nvra] = yumdata
|
83 | 83 |
|
84 |
| - PDSTRINGS = ['from_repo_timestamp', |
| 84 | + PDSTRINGS = ('from_repo_timestamp', |
85 | 85 | 'from_repo_revision',
|
86 | 86 | 'changed_by',
|
87 |
| - 'installonly', |
88 |
| - 'installed_by'] |
| 87 | + 'installed_by') |
89 | 88 |
|
90 | 89 | # crate PD_ID to T_ID dictionary for further use
|
91 | 90 | pdid_to_tid = {}
|
@@ -225,12 +224,10 @@ def bind_repo(cursor, name):
|
225 | 224 | return False
|
226 | 225 |
|
227 | 226 | # value distribution in tables
|
228 |
| - PACKAGE_DATA = ['P_ID', 'R_ID', 'from_repo_revision', |
229 |
| - 'from_repo_timestamp', 'installed_by', 'changed_by', |
230 |
| - 'installonly'] |
| 227 | + PACKAGE_DATA = ['P_ID', 'R_ID', 'from_repo_revision', 'from_repo_timestamp', |
| 228 | + 'installed_by', 'changed_by'] |
231 | 229 |
|
232 |
| - TRANS_DATA = ['T_ID', 'PD_ID', 'TG_ID', 'done', 'obsoleting', 'reason', |
233 |
| - 'state'] |
| 230 | + TRANS_DATA = ['T_ID', 'PD_ID', 'TG_ID', 'done', 'obsoleting', 'reason', 'state'] |
234 | 231 |
|
235 | 232 | GROUPS = ['name_id', 'name', 'ui_name', 'installed', 'pkg_types']
|
236 | 233 |
|
@@ -293,7 +290,7 @@ def bind_repo(cursor, name):
|
293 | 290 | cursor.execute('SELECT P_ID FROM PACKAGE WHERE P_ID NOT IN (SELECT P_ID FROM PACKAGE_DATA)')
|
294 | 291 | tmp_row = cursor.fetchall()
|
295 | 292 | for row in tmp_row:
|
296 |
| - cursor.execute("INSERT INTO PACKAGE_DATA VALUES(null,?,'','','','','','')", (row[0],)) |
| 293 | + cursor.execute("INSERT INTO PACKAGE_DATA VALUES(null,?,'','','','','')", (row[0],)) |
297 | 294 |
|
298 | 295 | # save changes
|
299 | 296 | database.commit()
|
|
0 commit comments