This is a lot nicer without eval().
On 9 Mar 2022, at 22:56, Robin Roevens robin.roevens@disroot.org wrote:
Replace coreupdate_available code duplicating coredbinfo workings with call to actual coredbinfo function.
Signed-off-by: Robin Roevens robin.roevens@disroot.org
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'}") {
} else { return "no";return "yes ($coredb{'AvailableRelease'})";
Is returning a string what we want here?
-- 2.34.1
-- Dit bericht is gescanned op virussen en andere gevaarlijke inhoud door MailScanner en lijkt schoon te zijn.