diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-18 09:46:07 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-18 09:46:07 +0000 |
commit | 4be1dc56b5b2e5367459bc97ef10e6a529e28927 (patch) | |
tree | 4a4036378109cfade2904bc1f1c5867ffe99b6c2 /urpm/xml_info.pm | |
parent | 435d92f61744e346fe549006f39aef606333c7e7 (diff) | |
download | urpmi-4be1dc56b5b2e5367459bc97ef10e6a529e28927.tar urpmi-4be1dc56b5b2e5367459bc97ef10e6a529e28927.tar.gz urpmi-4be1dc56b5b2e5367459bc97ef10e6a529e28927.tar.bz2 urpmi-4be1dc56b5b2e5367459bc97ef10e6a529e28927.tar.xz urpmi-4be1dc56b5b2e5367459bc97ef10e6a529e28927.zip |
- urpmf:
o add special code for --files simple case, it makes urpmf 3x faster for
this often used case
Diffstat (limited to 'urpm/xml_info.pm')
-rw-r--r-- | urpm/xml_info.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/urpm/xml_info.pm b/urpm/xml_info.pm index 24d1d101..bd3bed4e 100644 --- a/urpm/xml_info.pm +++ b/urpm/xml_info.pm @@ -19,13 +19,19 @@ sub do_something_with_nodes { } -################################################################################ -sub _open_xml_reader { +sub open_lzma { my ($xml_info_file) = @_; $xml_info_file =~ s/'/\'/g; open(my $F, "lzma -dc '$xml_info_file' |"); - my $reader = new XML::LibXML::Reader(IO => $F) or die "cannot read $xml_info_file\n"; + $F; +} + +################################################################################ +sub _open_xml_reader { + my ($xml_info_file) = @_; + + my $reader = new XML::LibXML::Reader(IO => open_lzma($xml_info_file)) or die "cannot read $xml_info_file\n"; $reader->read; $reader->name eq 'media_info' or die "global <media_info> tag not found\n"; |