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=66a9a35873c9789a2d3ae3f1d07c842ca0cb4a5c commit 66a9a35873c9789a2d3ae3f1d07c842ca0cb4a5c Author: Guillem Jover <guil...@debian.org> AuthorDate: Sat Jul 17 20:13:36 2021 +0200 dpkg-fsys-usrunmess: Move forced reconfiguration to the last step Reconfiguring packages has the most potential for unaccounted breakage, it is also the step that will take longer, and it should be the one easier to recover from, by calling «dpkg --pending --configure» at a later time. Move it at the end when we have done the reparation, and performed the cleanup. Ref: #991190 Stable-Candidate: 1.20.x --- man/dpkg-fsys-usrunmess.pod | 8 ++++---- scripts/dpkg-fsys-usrunmess.pl | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/man/dpkg-fsys-usrunmess.pod b/man/dpkg-fsys-usrunmess.pod index 3b2cfa814..f7065f5f1 100644 --- a/man/dpkg-fsys-usrunmess.pod +++ b/man/dpkg-fsys-usrunmess.pod @@ -77,10 +77,6 @@ Relabel MAC information for directories and symlinks if necessary. =item * -Reconfigure all packages. - -=item * - Remove backup symlinks. =item * @@ -95,6 +91,10 @@ Remove old deferred directories that are not referenced by dpkg-query. Remove shadow root directory. +=item * + +Reconfigure all packages. + =back B<Note>: When running the program from some shells such as L<bash(1)> or diff --git a/scripts/dpkg-fsys-usrunmess.pl b/scripts/dpkg-fsys-usrunmess.pl index 3e9aa5fa5..63b09ade7 100755 --- a/scripts/dpkg-fsys-usrunmess.pl +++ b/scripts/dpkg-fsys-usrunmess.pl @@ -269,17 +269,6 @@ foreach my $dir (@aliased_dirs) { mac_relabel(); -# -# Re-configure all packages, so that postinst maintscripts are executed. -# - -debug('reconfigured all packages'); -if (not $opt_noact) { - local $ENV{DEBIAN_FRONTEND} = 'noninteractive'; - system(qw(dpkg --configure --pending)) == 0 - or fatal("cannot reconfigure packages: $!"); -} - # # Cleanup backup directories. # @@ -365,6 +354,17 @@ if (not $opt_noact) { or sysfatal("cannot remove shadow directory $sroot"); } +# +# Re-configure all packages, so that postinst maintscripts are executed. +# + +debug('reconfigured all packages'); +if (not $opt_noact) { + local $ENV{DEBIAN_FRONTEND} = 'noninteractive'; + system(qw(dpkg --configure --pending)) == 0 + or fatal("cannot reconfigure packages: $!"); +} + print "Done, hierarchy unmessed, congrats!\n"; print "(Note: you might need to run 'hash -r' in your shell.)\n"; -- Dpkg.Org's dpkg