This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=272d1f1ee4e1d9726dc2bca1becd8e1f1c931e65 commit 272d1f1ee4e1d9726dc2bca1becd8e1f1c931e65 Author: Ian Jackson <[email protected]> AuthorDate: Mon Sep 29 23:03:40 2025 +0200 dpkg: Mark reinstreq during unpack as late as possible, not before prerm Previously the package would be reinstreq while we deal with conflictors' prerms and deconfiguration, but that's unnecessary. During cleanup, do not pointlessly clear the reinstreq flag on postinst "abort-upgrade", "abort-remove in-favour" and "abort-remove". cu_prermupgrade() is only be called via a push_cleanup() in unpack.c which is only executed if the package is at least halfconfigured so reinstreq must be clear to start with. [[email protected]: - Rebase patch against current codebase. - Reword commit message. ] Signed-off-by: Guillem Jover <[email protected]> --- src/main/cleanup.c | 3 --- src/main/unpack.c | 1 - 2 files changed, 4 deletions(-) diff --git a/src/main/cleanup.c b/src/main/cleanup.c index 96a4da812..d7d462ca9 100644 --- a/src/main/cleanup.c +++ b/src/main/cleanup.c @@ -138,7 +138,6 @@ cu_prermupgrade(int argc, void **argv) maintscript_postinst(pkg, "abort-upgrade", versiondescribe(&pkg->available.version, vdew_nonambig), NULL); - pkg_clear_eflags(pkg, PKG_EFLAG_REINSTREQ); post_postinst_tasks(pkg, PKG_STAT_INSTALLED); cleanup_pkg_failed--; @@ -210,7 +209,6 @@ cu_prerminfavour(int argc, void **argv) versiondescribe(&infavour->available.version, vdew_nonambig), NULL); - pkg_clear_eflags(conflictor, PKG_EFLAG_REINSTREQ); post_postinst_tasks(conflictor, PKG_STAT_INSTALLED); cleanup_conflictor_failed--; @@ -306,7 +304,6 @@ cu_prermremove(int argc, void **argv) return; maintscript_postinst(pkg, "abort-remove", NULL); - pkg_clear_eflags(pkg, PKG_EFLAG_REINSTREQ); post_postinst_tasks(pkg, PKG_STAT_INSTALLED); cleanup_pkg_failed--; diff --git a/src/main/unpack.c b/src/main/unpack.c index cbc93f7e7..18db43ed5 100644 --- a/src/main/unpack.c +++ b/src/main/unpack.c @@ -1451,7 +1451,6 @@ process_archive(const char *filename) oldversionstatus == PKG_STAT_TRIGGERSAWAITED || oldversionstatus == PKG_STAT_TRIGGERSPENDING || oldversionstatus == PKG_STAT_INSTALLED) { - pkg_set_eflags(pkg, PKG_EFLAG_REINSTREQ); pkg_set_status(pkg, PKG_STAT_HALFCONFIGURED); modstatdb_note(pkg); if (oldversionstatus > PKG_STAT_HALFCONFIGURED) -- Dpkg.Org's dpkg

