backend-sqlite3.c: added arch field to packages table
This commit is contained in:
parent
116eadbd6f
commit
758da30631
@ -316,7 +316,7 @@ long generateSQLite_add_changelog(sqlite3 *db, struct changeLog* firstchangelog,
|
||||
}
|
||||
|
||||
#define SQLITE_TABLE_packages "id INTEGER PRIMARY KEY, "\
|
||||
"name STRING, altrepository INTEGER, epoch INTEGER, version STRING, release STRING, summary STRING, "\
|
||||
"name STRING, arch STRING, altrepository INTEGER, epoch INTEGER, version STRING, release STRING, summary STRING, "\
|
||||
"groupdescr STRING, description STRING, size INTEGER, id_source INTEGER"
|
||||
|
||||
#define SQLITE_TABLE_obsoletes "id INTEGER PRIMARY KEY, "\
|
||||
@ -343,7 +343,7 @@ generateSQLite_packages(struct configTag *ct, sqlite3 *db, int arch) {
|
||||
currpackage = ct->headerlist[arch];
|
||||
while (currpackage) {
|
||||
if (currpackage->altrepository == ct->repository_level) {
|
||||
snprintf(sqlite3_query, PATH_MAX, "INSERT INTO packages VALUES(NULL,?,%d,%ld,?,?,?,?,?,%ld,%ld);",
|
||||
snprintf(sqlite3_query, PATH_MAX, "INSERT INTO packages VALUES(NULL,?,?,%d,%ld,?,?,?,?,?,%ld,%ld);",
|
||||
currpackage->altrepository,
|
||||
currpackage->epoch,
|
||||
currpackage->size,
|
||||
@ -354,11 +354,12 @@ generateSQLite_packages(struct configTag *ct, sqlite3 *db, int arch) {
|
||||
}
|
||||
|
||||
sqlite3_bind_text(stmt, 1, currpackage->name, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 2, currpackage->version, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 3, currpackage->release, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 4, currpackage->summary, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 5, currpackage->group, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 6, currpackage->description, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 2, currpackage->arch, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 3, currpackage->version, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 4, currpackage->release, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 5, currpackage->summary, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 6, currpackage->group, -1, SQLITE_STATIC);
|
||||
sqlite3_bind_text(stmt, 7, currpackage->description, -1, SQLITE_STATIC);
|
||||
|
||||
if (sqlite3_step(stmt) != SQLITE_DONE) {
|
||||
fprintf(stderr, "ERROR: SQLite: (%s) %s\n", sqlite3_query, sqlite3_errmsg(db));
|
||||
|
Loading…
Reference in New Issue
Block a user