]> git.ipfire.org Git - pakfire.git/commitdiff
Fix the download sizes.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 30 Jun 2012 10:19:52 +0000 (12:19 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 30 Jun 2012 10:19:52 +0000 (12:19 +0200)
Newer versions of libsolv require an unsigned long here.

python/src/solvable.c

index 21ad758134a1e53c8a478ee2da52e9a01bd2379c..1198df3895c29efa668b8826cbca08733ad8e5f1 100644 (file)
@@ -492,10 +492,10 @@ PyObject *Solvable_set_downloadsize(SolvableObject *self, PyObject *args) {
 PyObject *Solvable_get_downloadsize(SolvableObject *self) {
        Solvable *solv = pool_id2solvable(self->_pool, self->_id);
 
-       unsigned int downloadsize = repo_lookup_num(solv->repo, self->_id,
+       unsigned long long downloadsize = repo_lookup_num(solv->repo, self->_id,
                SOLVABLE_DOWNLOADSIZE, 0);
 
-       return Py_BuildValue("i", downloadsize);
+       return Py_BuildValue("K", downloadsize / 1024);
 }
 
 PyObject *Solvable_set_installsize(SolvableObject *self, PyObject *args) {