From 01b07559f8329ebfcc24046f33d084e767600b3d Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Fri, 30 May 2025 23:01:58 +0300 Subject: [PATCH 1/3] Fix cumulative `deb_obsoletes` to also break --- makemoduledeb.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/makemoduledeb.pl b/makemoduledeb.pl index 42f41e688..854eef898 100755 --- a/makemoduledeb.pl +++ b/makemoduledeb.pl @@ -315,11 +315,20 @@ if (exists($minfo{'deb_replaces'})) { } } +# Build (standalone) list of breaks (not Webmin modules) +my @rbreaks = ( ); +if (exists($minfo{'deb_breaks'})) { + foreach my $debbreak (split(/\s+/, $minfo{'deb_breaks'})) { + push(@rbreaks, $debbreak); + } + } + # Build (standalone) list of obsoletes (replaces+conflicts) (not Webmin modules) if (exists($minfo{'deb_obsoletes'})) { foreach my $debobsolete (split(/\s+/, $minfo{'deb_obsoletes'})) { push(@rconflicts, $debobsolete); push(@rreplaces, $debobsolete); + push(@rbreaks, $debobsolete); } } @@ -347,6 +356,7 @@ print $CONTROL "Recommends: $rrecom\n" if ($rrecom); print $CONTROL "Suggests: ", join(", ", @rsuggests), "\n" if (@rsuggests); print $CONTROL "Conflicts: ", join(", ", @rconflicts), "\n" if (@rconflicts); print $CONTROL "Replaces: ", join(", ", @rreplaces), "\n" if (@rreplaces); +print $CONTROL "Breaks: ", join(", ", @rbreaks), "\n" if (@rbreaks); print $CONTROL "Provides: ", join(", ", @rprovides), "\n" if (@rprovides); print $CONTROL < Date: Fri, 30 May 2025 23:47:37 +0300 Subject: [PATCH 2/3] Fix to remove breaks from obsolete is it isn't correct way --- makemoduledeb.pl | 1 - 1 file changed, 1 deletion(-) diff --git a/makemoduledeb.pl b/makemoduledeb.pl index 854eef898..05638480f 100755 --- a/makemoduledeb.pl +++ b/makemoduledeb.pl @@ -328,7 +328,6 @@ if (exists($minfo{'deb_obsoletes'})) { foreach my $debobsolete (split(/\s+/, $minfo{'deb_obsoletes'})) { push(@rconflicts, $debobsolete); push(@rreplaces, $debobsolete); - push(@rbreaks, $debobsolete); } } From f3088ad7d046e27accdbb367aefc4ce5fb23c103 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sat, 31 May 2025 14:53:16 +0300 Subject: [PATCH 3/3] Fix a bug that prevented the uninstall script from running --- makemoduledeb.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makemoduledeb.pl b/makemoduledeb.pl index 05638480f..b7a51a223 100755 --- a/makemoduledeb.pl +++ b/makemoduledeb.pl @@ -535,7 +535,7 @@ if [ "$istheme" = "1" -a "\$1" != "upgrade" ]; then fi fi # Run the pre-uninstall script, if we are not upgrading -if [ "$product" = "webmin" -a "\$1" = "0" -a -r "/usr/share/$product/$mod/uninstall.pl" ]; then +if [ "$product" = "webmin" -a "\$1" != "upgrade" -a -r "/usr/share/$product/$mod/uninstall.pl" ]; then cd /usr/share/$product WEBMIN_CONFIG=/etc/$product WEBMIN_VAR=/var/$product /usr/share/$product/run-uninstalls.pl $mod fi