From: Arne Fitzenreiter Date: Mon, 24 Feb 2020 18:51:24 +0000 (+0000) Subject: pakfire: Re-install previous core update when in testing mode X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=712425ff0bbe96700de5a1b865d58730ba9c6b90 pakfire: Re-install previous core update when in testing mode Fixes: #12302 Signed-off-by: Arne Fitzenreiter Tested-by: Michael Tremer Reviewed-by: Peter Müller Signed-off-by: Arne Fitzenreiter --- diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index ddb1e9aadb..45e3427b1c 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -768,6 +768,12 @@ sub upgradecore { getcoredb("noforce"); eval(`grep "core_" $Conf::dbdir/lists/core-list.db`); if ("$core_release" > "$Conf::core_mine") { + # Safety check for lazy testers: + # Before we upgrade to the latest release, we re-install the previous release + # to make sure that the tester has always been on the latest version. + my $tree = &get_tree(); + $Conf::core_mine-- if ($tree eq "testing" || $tree eq "unstable"); + message("CORE UPGR: Upgrading from release $Conf::core_mine to $core_release"); my @seq = `seq $Conf::core_mine $core_release`;