distromatic: add buildtime field to binary packages dbs
This commit is contained in:
parent
f320087f12
commit
af58277e8c
@ -317,7 +317,7 @@ long generateSQLite_add_changelog(sqlite3 *db, struct changeLog* firstchangelog,
|
|||||||
|
|
||||||
#define SQLITE_TABLE_packages "id INTEGER PRIMARY KEY, "\
|
#define SQLITE_TABLE_packages "id INTEGER PRIMARY KEY, "\
|
||||||
"name STRING, arch 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"
|
"groupdescr STRING, description STRING, buildtime INTEGER, size INTEGER, id_source INTEGER"
|
||||||
|
|
||||||
#define SQLITE_TABLE_obsoletes "id INTEGER PRIMARY KEY, "\
|
#define SQLITE_TABLE_obsoletes "id INTEGER PRIMARY KEY, "\
|
||||||
"id_package INTEGER, obsoletename STRING, obsoleteflags INTEGER, obsoleteversion STRING"
|
"id_package INTEGER, obsoletename STRING, obsoleteflags INTEGER, obsoleteversion STRING"
|
||||||
@ -343,9 +343,10 @@ generateSQLite_packages(struct configTag *ct, sqlite3 *db, int arch) {
|
|||||||
currpackage = ct->headerlist[arch];
|
currpackage = ct->headerlist[arch];
|
||||||
while (currpackage) {
|
while (currpackage) {
|
||||||
if (currpackage->altrepository == ct->repository_level) {
|
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,%ld);",
|
||||||
currpackage->altrepository,
|
currpackage->altrepository,
|
||||||
currpackage->epoch,
|
currpackage->epoch,
|
||||||
|
currpackage->buildtime,
|
||||||
currpackage->size,
|
currpackage->size,
|
||||||
currpackage->sourceheader->id);
|
currpackage->sourceheader->id);
|
||||||
if (sqlite3_prepare_v2(db, sqlite3_query, -1, &stmt, NULL)) {
|
if (sqlite3_prepare_v2(db, sqlite3_query, -1, &stmt, NULL)) {
|
||||||
|
@ -171,6 +171,7 @@ getPackageInfoIntoHeaderList(Header h, struct headerList *hl)
|
|||||||
hl->description = headerGetStringEntry(h, RPMTAG_DESCRIPTION);
|
hl->description = headerGetStringEntry(h, RPMTAG_DESCRIPTION);
|
||||||
hl->sourcename = headerGetStringEntry(h, RPMTAG_SOURCERPM);
|
hl->sourcename = headerGetStringEntry(h, RPMTAG_SOURCERPM);
|
||||||
hl->group = headerGetStringEntry(h, RPMTAG_GROUP);
|
hl->group = headerGetStringEntry(h, RPMTAG_GROUP);
|
||||||
|
hl->buildtime = headerGetUIntEntry(h, RPMTAG_BUILDTIME);
|
||||||
hl->size = headerGetUIntEntry(h, RPMTAG_SIZE);
|
hl->size = headerGetUIntEntry(h, RPMTAG_SIZE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -79,6 +79,7 @@ struct headerList {
|
|||||||
char *description;
|
char *description;
|
||||||
char *sourcename;
|
char *sourcename;
|
||||||
char *arch;
|
char *arch;
|
||||||
|
long buildtime;
|
||||||
long size;
|
long size;
|
||||||
char **obsoletename;
|
char **obsoletename;
|
||||||
uint_32 *obsoleteflags;
|
uint_32 *obsoleteflags;
|
||||||
|
Loading…
Reference in New Issue
Block a user