|
|
@@ -225,19 +225,24 @@ pkg_parse_verify(struct parsedb_state *ps,
|
|
|
if (!dop->arch)
|
|
|
dop->arch = pkgbin->arch;
|
|
|
|
|
|
- /* Check the Config-Version information:
|
|
|
- * If there is a Config-Version it is definitely to be used, but
|
|
|
- * there shouldn't be one if the package is ‘installed’ (in which case
|
|
|
- * the Version and/or Revision will be copied) or if the package is
|
|
|
- * ‘not-installed’ (in which case there is no Config-Version). */
|
|
|
+ /*
|
|
|
+ * Check the Config-Version information:
|
|
|
+ *
|
|
|
+ * If there is a Config-Version it is definitely to be used, but there
|
|
|
+ * should not be one if the package is ‘installed’ or ‘triggers-pending’
|
|
|
+ * (in which case the Version will be copied) or if the package is
|
|
|
+ * ‘not-installed’ (in which case there is no Config-Version).
|
|
|
+ */
|
|
|
if (!(ps->flags & pdb_recordavailable)) {
|
|
|
if (pkg->configversion.version) {
|
|
|
if (pkg->status == PKG_STAT_INSTALLED ||
|
|
|
- pkg->status == PKG_STAT_NOTINSTALLED)
|
|
|
+ pkg->status == PKG_STAT_NOTINSTALLED ||
|
|
|
+ pkg->status == PKG_STAT_TRIGGERSPENDING)
|
|
|
parse_error(ps,
|
|
|
_("Config-Version for package with inappropriate Status"));
|
|
|
} else {
|
|
|
- if (pkg->status == PKG_STAT_INSTALLED)
|
|
|
+ if (pkg->status == PKG_STAT_INSTALLED ||
|
|
|
+ pkg->status == PKG_STAT_TRIGGERSPENDING)
|
|
|
pkg->configversion = pkgbin->version;
|
|
|
}
|
|
|
}
|