From e82c202d2ec40027d7262336e67e0902f73a0a01 Mon Sep 17 00:00:00 2001 From: Ilia Rostovtsev Date: Mon, 27 Jan 2020 13:41:21 +0300 Subject: [PATCH] Revert https://github.com/webmin/webmin/commit/8cc0aaad045d75ac09acec01dcd380fb5821f9e0 --- package-updates/index.cgi | 36 ++++++++++-------------------------- package-updates/lang/en | 3 +++ software/apt-lib.pl | 5 ----- 3 files changed, 13 insertions(+), 31 deletions(-) diff --git a/package-updates/index.cgi b/package-updates/index.cgi index c0f617181..1c00ea2d6 100755 --- a/package-updates/index.cgi +++ b/package-updates/index.cgi @@ -64,18 +64,12 @@ foreach $p (sort { $a->{'name'} cmp $b->{'name'} } (@current, @avail)) { # Work out the status $c = $current{$p->{'name'}."/".$p->{'system'}}; $a = $avail{$p->{'name'}."/".$p->{'system'}}; - $bp = $a->{'disallowed'} =~ /\/Backports/; if ($a && $c && &compare_versions($a, $c) > 0) { # An update is available - if ($bp) { - $msg = ''.&ui_text_color(&text('index_new_backports', $a->{'version'}), 'success').''; - } - else { - $msg = "". - &text('index_new', $a->{'version'}).""; - $need = 1; - } + $msg = "". + &text('index_new', $a->{'version'}).""; + $need = 1; next if ($in{'mode'} eq 'security' && !$a->{'security'}); next if ($in{'mode'} ne 'updates' && $in{'mode'} ne 'current' && @@ -84,12 +78,7 @@ foreach $p (sort { $a->{'name'} cmp $b->{'name'} } (@current, @avail)) { elsif ($a && !$c) { # Could be installed, but isn't currently next if (!&installation_candiate($a)); - if ($bp) { - $msg = &ui_text_color($text{'index_caninstall_backports'}, 'success'); - } - else { - $msg = "$text{'index_caninstall'}"; - } + $msg = "$text{'index_caninstall'}"; $need = 0; next if ($in{'mode'} ne 'new'); } @@ -111,10 +100,7 @@ foreach $p (sort { $a->{'name'} cmp $b->{'name'} } (@current, @avail)) { next if ($in{'mode'} ne 'current'); } $source = ucfirst($a->{'source'}); - if ($bp) { - $source = &ui_text_color("$source$a->{'disallowed'} ?", 'info'); - } - elsif ($a->{'security'}) { + if ($a->{'security'}) { $source = "$source"; } @@ -131,13 +117,11 @@ foreach $p (sort { $a->{'name'} cmp $b->{'name'} } (@current, @avail)) { push(@rows, [ { 'type' => 'checkbox', 'name' => 'u', 'value' => $p->{'update'}."/".$p->{'system'}, - 'checked' => $need, - 'disabled' => $bp ? 1 : 0 }, - ($bp ? $p->{'name'} : - &ui_link("view.cgi?mode=$in{'mode'}&name=". - &urlize($p->{'name'})."&system=". - &urlize($p->{'system'})."&search=". - &urlize($in{'search'}), $p->{'name'})), + 'checked' => $need }, + &ui_link("view.cgi?mode=$in{'mode'}&name=". + &urlize($p->{'name'})."&system=". + &urlize($p->{'system'})."&search=". + &urlize($in{'search'}), $p->{'name'}), $p->{'desc'}, $msg, $source ? ( $source ) : ( ), diff --git a/package-updates/lang/en b/package-updates/lang/en index da5b32289..5ac4b1fc3 100644 --- a/package-updates/lang/en +++ b/package-updates/lang/en @@ -148,8 +148,11 @@ repos_enone=None selected repos_title=Delete Repositories repos_rusure=Are you sure you want to delete the $1 selected package repositories? Packages installed from them will still be available, but may not be updatable. repos_ok=Delete Now +<<<<<<< HEAD index_install_disallowed_backports=By default backports repositories have a lower priority than stable (100), thus they won't be installed or upgraded unless explicitly configured to (or the package only exists in backports) - packages from backports must be installed using command line, with special flags index_new_backports=Backports new version $1 index_caninstall_backports=Available for manual installation +======= +>>>>>>> parent of 8cc0aaad0... Fix to handle backports repos (Ubuntu enabled default) __norefs=1 diff --git a/software/apt-lib.pl b/software/apt-lib.pl index 44f9ddd94..a93efc105 100755 --- a/software/apt-lib.pl +++ b/software/apt-lib.pl @@ -185,11 +185,6 @@ while() { elsif (/^\s*File:\s*(\S+)/ && $pkg) { $pkg->{'file'} ||= $1; } - # By default Debian backports repositories have a lower priority than stable (100) thus they won't - # be installed or upgraded unless explicitly configured to (or the package only exists in backports). - if ($pkg->{'file'} =~ /dists_.*-backports/) { - $pkg->{'disallowed'} = "/Backports"; - } } close(DUMP); &reset_environment();