PACKAGE_EXTENSION = "pfm"
MAKEFILE_EXTENSION = "nm"
-DATABASE_FORMAT = 5
-DATABASE_FORMATS_SUPPORTED = [0, 1, 2, 3, 4, 5]
+DATABASE_FORMAT = 6
+DATABASE_FORMATS_SUPPORTED = [0, 1, 2, 3, 4, 5, 6]
PACKAGE_FILENAME_FMT = "%(name)s-%(version)s-%(release)s.%(arch)s.%(ext)s"
import pakfire.packages as packages
from pakfire.constants import *
+from pakfire.errors import *
from pakfire.i18n import _
class Cursor(sqlite3.Cursor):
if self.format < 5:
c.execute("ALTER TABLE files ADD COLUMN datafile INTEGER AFTER config")
+ if self.format < 6:
+ c.execute("ALTER TABLE packages ADD COLUMN inst_size INTEGER AFTER size")
+
# In the end, we can easily update the version of the database.
c.execute("UPDATE settings SET val = ? WHERE key = 'version'", (DATABASE_FORMAT,))
self.__format = DATABASE_FORMAT
groups,
filename,
size,
+ inst_size,
hash1,
provides,
requires,
installed,
repository,
reason
- ) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
+ ) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
(
pkg.name,
pkg.epoch,
" ".join(pkg.groups),
pkg.filename,
pkg.size,
+ pkg.inst_size,
pkg.hash1,
"\n".join(pkg.provides),
"\n".join(pkg.requires),