diff options
author | Francois Pons <fpons@mandriva.com> | 2002-02-20 14:06:10 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-02-20 14:06:10 +0000 |
commit | 3a058c5054c30040a8d641772e2a488896e5a387 (patch) | |
tree | 7e47d4ed1854077b3d4c31d8486c2b4f88bbceda | |
parent | 97368128e187425c5ea9fc5db7bc25347bd67aaa (diff) | |
download | drakx-backup-do-not-use-3a058c5054c30040a8d641772e2a488896e5a387.tar drakx-backup-do-not-use-3a058c5054c30040a8d641772e2a488896e5a387.tar.gz drakx-backup-do-not-use-3a058c5054c30040a8d641772e2a488896e5a387.tar.bz2 drakx-backup-do-not-use-3a058c5054c30040a8d641772e2a488896e5a387.tar.xz drakx-backup-do-not-use-3a058c5054c30040a8d641772e2a488896e5a387.zip |
fixed NVIDIA package in urpmi db by directly using urpm library instead of
parsing (now removed) depslist.ordered file.
-rwxr-xr-x | perl-install/standalone/XFdrake | 24 |
1 files changed, 18 insertions, 6 deletions
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 (<F>) { - /(.*NVIDIA.*)-([^-]*)-([^-]*)\s+/ and $list{$1} = 1; -} -close F; +#- local *F; +#- open F, "/var/lib/urpmi/depslist.ordered"; +#- while (<F>) { +#- /(.*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*)/; |