summaryrefslogtreecommitdiff
path: root/src/infodb.h
AgeCommit message (Collapse)AuthorFilesLines
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover1-1/+1
2012-10-13Avoid info database corruption and bogus accesses on unknown format valuesGuillem Jover1-0/+1
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-03Move pkg_infodb_get_dir() and pkg_infodb_get_file() to infodb-format.cGuillem Jover1-0/+3
These functions have never belonged in the filesdb module, but were put there temporarily for convenience.
2012-03-19dpkg: Upgrade the database automatically to the new multi-arch layoutGuillem Jover1-0/+1
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>
2012-03-19dpkg: Update on-disk database to use a multiarch compliant layoutGuillem Jover1-0/+10
The usage of the new layout is conditional to a prior database upgrade that should write a version number greater than 0 in <admindir>/info/format. The file is parsed when needed from pkg_infodb_get_format(). Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org> Patch-sponsored-by: Linaro Limited Signed-off-by: Guillem Jover <guillem@debian.org>
2011-10-30Switch pkgadminfile() to get an explicit pkgbin as argumentGuillem Jover1-2/+4
The code does not do anything yet with this new argument, but it will allow it to access the multiarch information, once the on-disk layout is changed.
2011-03-02dpkg: Refactor infodb directory traversal into new pkg_infodb_foreach()Guillem Jover1-0/+4
Move the common code into a new function which will call an action pointer function on matched files to perform the specific logic.
2011-03-02dpkg: Refactor infodb file existence check into new pkg_infodb_has_file()Guillem Jover1-0/+30