commit 2d8499cf272bf9027d015fae0d344998debfae69
Author: James Antill <james@and.org>
Date: Sat Aug 21 18:26:33 2010 -0400
Handle > 2GB sized rpms, in XML => sqlite conversion, BZ 612409.
diff --git a/db.c b/db.c
index 4d49595..80f87af 100644
--- a/db.c
+++ b/db.c
@@ -550,9 +550,9 @@ yum_db_package_write (sqlite3 *db, sqlite3_stmt *handle, Package *p)
sqlite3_bind_int (handle, 17, p->rpm_header_start);
sqlite3_bind_int (handle, 18, p->rpm_header_end);
sqlite3_bind_text (handle, 19, p->rpm_packager, -1, SQLITE_STATIC);
- sqlite3_bind_int (handle, 20, p->size_package);
- sqlite3_bind_int (handle, 21, p->size_installed);
- sqlite3_bind_int (handle, 22, p->size_archive);
+ sqlite3_bind_int64 (handle, 20, p->size_package);
+ sqlite3_bind_int64 (handle, 21, p->size_installed);
+ sqlite3_bind_int64 (handle, 22, p->size_archive);
sqlite3_bind_text (handle, 23, p->location_href, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 24, p->location_base, -1, SQLITE_STATIC);
sqlite3_bind_text (handle, 25, p->checksum_type, -1, SQLITE_STATIC);
commit ffdcc0bf2bc9abc1f36f47378128af9afe2134e9
Author: James Antill <james@and.org>
Date: Thu Feb 24 11:18:54 2011 -0500
Change the conversion to be 64bit safe too, *sigh*. BZ 612409
diff --git a/xml-parser.c b/xml-parser.c
index 9617d17..35f04e6 100644
--- a/xml-parser.c
+++ b/xml-parser.c
@@ -185,11 +185,11 @@ primary_parser_package_start (PrimarySAXContext *ctx,
value = attrs[++i];
if (!strcmp (attr, "package"))
- p->size_package = strtol(value, NULL, 10);
+ p->size_package = strtoll(value, NULL, 10);
else if (!strcmp (attr, "installed"))
- p->size_installed = strtol(value, NULL, 10);
+ p->size_installed = strtoll(value, NULL, 10);
else if (!strcmp (attr, "archive"))
- p->size_archive = strtol(value, NULL, 10);
+ p->size_archive = strtoll(value, NULL, 10);
}
}