Update of /cvsroot/fink/pdb
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv19105
Modified Files:
create-finkdb.pl
Log Message:
don't bother parsing the xml
Index: create-finkdb.pl
===================================================================
RCS file: /cvsroot/fink/pdb/create-finkdb.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- create-finkdb.pl 28 Nov 2007 14:29:49 -0000 1.10
+++ create-finkdb.pl 28 Nov 2007 15:19:21 -0000 1.11
@@ -450,20 +450,22 @@
my $file = $_;
print "file = $file\n" if ($trace);
- my $xml = XMLin($file);
- $xml = $xml->{'doc'}->{'field'};
- return unless ($xml->{'doc_id'}->{'content'});
- my $package_info = {};
+ my $contents = read_file($file);
+ my ($doc_id) = $contents =~ /<field
name="doc_id">([^<]+)/;
+ my ($name) = $contents =~ /<field
name="name">([^<]+)/;
+ my ($infofile) = $contents =~ /<field
name="infofile">([^<]+)/;
- my $infofile = $basepath . '/fink/dists/' .
$xml->{'infofile'}->{'content'} if (exists $xml->{'infofile'} and exists
$xml->{'infofile'}->{'content'});
+ return unless (defined($doc_id) and
defined($infofile));
+
+ my $infofile = $basepath . '/fink/dists/' .
$infofile;
print "infofile = $infofile\n" if ($trace);
if (defined $infofile and -f $infofile)
{
- print " - package
$xml->{'name'}->{'content'} is still valid ($infofile)\n" if ($trace);
+ print " - package $name is still valid
($infofile)\n" if ($trace);
} else {
- # print "- removing obsolete package
$xml->{'name'}->{'content'}\n" if ($debug);
- post_to_solr('<delete><query>+doc_id:'
. $xml->{'doc_id'}->{'content'} . '</query></delete>');
+ # print "- removing obsolete package
$name\n" if ($debug);
+ post_to_solr('<delete><query>+doc_id:'
. $doc_id . '</query></delete>');
unlink($file);
}
},
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs