This looks okay, too. > On 9 Mar 2022, at 22:56, Robin Roevens wrote: > > Replace dbgetlist code duplicating dblist and getmetafile > workings with call to actual dblist and getmetafile functions. > > Signed-off-by: Robin Roevens > --- > src/pakfire/lib/functions.pl | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > > diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl > index f08f43622..0caa4787e 100644 > --- a/src/pakfire/lib/functions.pl > +++ b/src/pakfire/lib/functions.pl > @@ -401,9 +401,7 @@ sub dbgetlist { > my %metadata; > my @templine; > > - open(FILE, "<$Conf::dbdir/lists/packages_list.db"); > - my @db = ; > - close(FILE); > + my %paklist = &Pakfire::dblist("all"); > > opendir(DIR,"$Conf::dbdir/meta"); > my @files = readdir(DIR); > @@ -415,13 +413,9 @@ sub dbgetlist { > next if ( $file =~ /^old/ ); > %metadata = parsemetafile("$Conf::dbdir/meta/$file"); > > - foreach $prog (@db) { > - @templine = split(/\;/,$prog); > - if (("$metadata{'Name'}" eq "$templine[0]") && ("$metadata{'Release'}" ne "$templine[2]")) { > - move("$Conf::dbdir/meta/meta-$metadata{'Name'}","$Conf::dbdir/meta/old_meta-$metadata{'Name'}"); > - fetchfile("meta/meta-$metadata{'Name'}", ""); > - move("$Conf::cachedir/meta-$metadata{'Name'}", "$Conf::dbdir/meta/meta-$metadata{'Name'}"); > - } > + if ((defined $paklist{"$metadata{'Name'}"}) && ("$paklist{\"$metadata{'Name'}\"}{'Release'}" ne "$metadata{'Release'}")) { > + move("$Conf::dbdir/meta/meta-$metadata{'Name'}","$Conf::dbdir/meta/old_meta-$metadata{'Name'}"); > + getmetafile($metadata{'Name'}); > } > } > } > -- > 2.34.1 > > > -- > Dit bericht is gescanned op virussen en andere gevaarlijke > inhoud door MailScanner en lijkt schoon te zijn. >