goto ERROR;
}
+ // Groups
+ const char* groups = (const char*)sqlite3_column_text(stmt, 5);
+ if (groups) {
+ pakfire_package_set_groups(pkg, groups);
+ }
+
+ // Filename
+ const char* filename = (const char*)sqlite3_column_text(stmt, 6);
+ if (filename) {
+ pakfire_package_set_filename(pkg, filename);
+ }
+
+ // Size
+ size_t size = sqlite3_column_int64(stmt, 7);
+ if (size) {
+ pakfire_package_set_downloadsize(pkg, size);
+ }
+
+ // Installed size
+ size = sqlite3_column_int64(stmt, 8);
+ if (size) {
+ pakfire_package_set_installsize(pkg, size);
+ }
+
+ // Hash 1
+ const char* hash1 = (const char*)sqlite3_column_text(stmt, 9);
+ if (hash1) {
+ pakfire_package_set_checksum(pkg, hash1);
+ }
+
+ // License
+ const char* license = (const char*)sqlite3_column_text(stmt, 10);
+ if (license) {
+ pakfire_package_set_license(pkg, license);
+ }
+
+ // Summary
+ const char* summary = (const char*)sqlite3_column_text(stmt, 11);
+ if (summary) {
+ pakfire_package_set_summary(pkg, summary);
+ }
+
+ // Description
+ const char* description = (const char*)sqlite3_column_text(stmt, 12);
+ if (description) {
+ pakfire_package_set_description(pkg, description);
+ }
+
+ // UUID
+ const char* uuid = (const char*)sqlite3_column_text(stmt, 13);
+ if (uuid) {
+ pakfire_package_set_uuid(pkg, uuid);
+ }
+
+ // Vendor
+ const char* vendor = (const char*)sqlite3_column_text(stmt, 14);
+ if (vendor) {
+ pakfire_package_set_vendor(pkg, vendor);
+ }
+
+ // Build Host
+ const char* build_host = (const char*)sqlite3_column_text(stmt, 15);
+ if (build_host) {
+ pakfire_package_set_buildhost(pkg, build_host);
+ }
+
+ // Build Time
+ time_t build_time = sqlite3_column_int64(stmt, 16);
+ if (build_time) {
+ pakfire_package_set_buildtime(pkg, build_time);
+ }
+
// Success
r = 0;
const char* sql =
"SELECT "
- "name, "
- "epoch, "
- "version, "
- "release, "
- "arch "
+ "name, epoch, version, release, arch, groups, filename, size, inst_size, "
+ "hash1, license, summary, description, uuid, vendor, build_host, build_time "
"FROM "
"packages"
";";