From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH 4/9] pakfire: Replace coreupdate_available duplicate code Date: Wed, 09 Mar 2022 23:56:50 +0100 Message-ID: <20220309225655.4472-5-robin.roevens@disroot.org> In-Reply-To: <20220309225655.4472-1-robin.roevens@disroot.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4777192952594269357==" List-Id: --===============4777192952594269357== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Replace coreupdate_available code duplicating coredbinfo workings with call to actual coredbinfo function. Signed-off-by: Robin Roevens --- src/pakfire/lib/functions.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 0caa4787e..1e2729485 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -884,9 +884,10 @@ sub updates_available { } sub coreupdate_available { - eval(`grep "core_" $Conf::dbdir/lists/core-list.db`); - if ("$core_release" > "$Conf::core_mine") { - return "yes ($core_release)"; + my %coredb = &Pakfire::coredbinfo(); + + if ("$coredb{'AvailableRelease'}" > "$coredb{'Release'}") { + return "yes ($coredb{'AvailableRelease'})"; } else { return "no"; -- 2.34.1 -- Dit bericht is gescanned op virussen en andere gevaarlijke inhoud door MailScanner en lijkt schoon te zijn. --===============4777192952594269357==--