summaryrefslogtreecommitdiff
path: root/src/infodb-upgrade.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-18dpkg: Fix varbuf memory leaksGuillem Jover1-0/+1
In «dpkg --verify» and the dpkg infodb format upgrade logic. Both are not big leaks, the first is bound by the amount of packages, as the varbuf is reused for each file on each package, and the second is just one instance of a leaked varbuf. Stable-Candidate: 1.16.x 1.17.x
2015-10-18libdpkg: Add varbuf_snapshot() and varbuf_rollback() supportGuillem Jover1-4/+4
This adds a proper interface to snapshot a varbuf state and it rollback so that a common stem can be reused on multiple instances.
2015-10-18Update Ian Jackson's email addressGuillem Jover1-1/+1
2015-04-10Consistently use proper quotation marks all over the placeGuillem Jover1-5/+5
That is "" or '', and not the unbalanced `' pair.
2014-06-02libdpkg: Uppercase and namespace pkgstatus enum valuesGuillem Jover1-1/+1
2014-06-02libdpkg: Uppercase and namespace pkgmultiarch enum valuesGuillem Jover1-1/+1
2014-05-28dpkg: Uppercase pkg_infodb_format enum valuesGuillem Jover1-2/+2
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover1-1/+1
2013-09-19Decapitalize error and warning messagesGuillem Jover1-1/+1
2012-10-13Avoid info database corruption and bogus accesses on unknown format valuesGuillem Jover1-1/+6
Make sure to always read the format file whenever we are about to access the info database, so that we can verify that we understand the format, and bail out otherwise. This fixes a currently possible info database corruption and bogus access, whenever the format is lower than 0 or higher than the last understood one, and makes the info database code future-proof in case new actual formats get introduced.
2012-04-03Rename pkgadmin*() to pkg_infodb_get_*()Guillem Jover1-3/+3
2012-03-19dpkg: Upgrade the database automatically to the new multi-arch layoutGuillem Jover1-0/+247
The upgrade is scheduled by explicit calls to pkg_infodb_upgrade() if the current database format version is less than the latest supported format or if the previous upgrade was interrupted. The upgrade goes as follows: - link all old files to their new names. - set <admindir>/info/format-new to 1. - remove all old files. - rename <admindir>/info/format-new to <admindir>/info/format. In case of abrupt interruption, the presence of <admindir>/info/format-new means the upgrade is not yet completed and it needs to be retried. In case of clean interruption with rollback, that file is removed after the old layout has been restored. Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org> Patch-sponsored-by: Linaro Limited Designed-by: Guillem Jover <guillem@debian.org> Signed-off-by: Guillem Jover <guillem@debian.org>