From 3a058c5054c30040a8d641772e2a488896e5a387 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 20 Feb 2002 14:06:10 +0000 Subject: fixed NVIDIA package in urpmi db by directly using urpm library instead of parsing (now removed) depslist.ordered file. --- perl-install/standalone/XFdrake | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'perl-install/standalone/XFdrake') diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index 66b8746ea..674366c84 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -61,12 +61,24 @@ Xconfig::getinfoFromXF86Config($i); #- take default from here at least. my $allowNVIDIA_rpms; my (%list, %select); -local *F; -open F, "/var/lib/urpmi/depslist.ordered"; -while () { - /(.*NVIDIA.*)-([^-]*)-([^-]*)\s+/ and $list{$1} = 1; -} -close F; +#- local *F; +#- open F, "/var/lib/urpmi/depslist.ordered"; +#- while () { +#- /(.*NVIDIA.*)-([^-]*)-([^-]*)\s+/ and $list{$1} = 1; +#- } +#- close F; +#- now replaced by the following code using directly urpm library. +eval { + require urpm; + my $urpm = new urpm; + $urpm->read_config(nocheck_access => 1); + foreach (grep { !$_->{ignore} } @{$urpm->{media} || []}) { + $urpm->parse_synthesis($_); + } + foreach (@{$urpm->{params}{depslist} || []}) { + $_->{name} =~ /NVIDIA/ and $list->{$_->{name}} = 1; + } +}; if ($list{NVIDIA_GLX}) { eval { my ($version, $release, $ext) = `uname -r` =~ /([^-]*)-([^-]*mdk)(\S*)/; -- cgit v1.2.1