diff options
author | Guillem Jover <guillem@debian.org> | 2011-11-05 21:38:07 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2012-03-19 07:59:43 +0100 |
commit | 81fbbcec494660401e943230d8e3c3c5f22feb6c (patch) | |
tree | a6d095b1475f98619ef29d5f7c1639c1982f27bf /src/infodb.h | |
parent | 69a5e4d5cbca41583dd6133a865bfb1c3edbc91f (diff) | |
download | dpkg-81fbbcec494660401e943230d8e3c3c5f22feb6c.tar.gz |
dpkg: Upgrade the database automatically to the new multi-arch layout
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>
Diffstat (limited to 'src/infodb.h')
-rw-r--r-- | src/infodb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/infodb.h b/src/infodb.h index fbba824f7..99935046d 100644 --- a/src/infodb.h +++ b/src/infodb.h @@ -34,6 +34,7 @@ enum pkg_infodb_format { enum pkg_infodb_format pkg_infodb_get_format(void); void pkg_infodb_set_format(enum pkg_infodb_format format); bool pkg_infodb_is_upgrading(void); +void pkg_infodb_upgrade(void); bool pkg_infodb_has_file(struct pkginfo *pkg, struct pkgbin *pkgbin, const char *name); |