Update of /cvsroot/fink/experimental/rangerrick/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv8623
Modified Files:
rss-newpackages.pl
Log Message:
track versioning so only revision updates show in the RSS
Index: rss-newpackages.pl
===================================================================
RCS file: /cvsroot/fink/experimental/rangerrick/scripts/rss-newpackages.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rss-newpackages.pl 20 Mar 2003 04:15:46 -0000 1.5
+++ rss-newpackages.pl 27 Sep 2003 22:40:27 -0000 1.6
@@ -2,6 +2,8 @@
use File::Find;
use XML::RSS;
+use Storable;
+
#use utf8;
use strict;
@@ -19,6 +21,8 @@
$UNSTABLE_RSS
%STABLE_PACKAGES
%UNSTABLE_PACKAGES
+
+ $CACHE
);
$DAYS = 1.5; # number of days to look back
@@ -28,20 +32,26 @@
$SCP = 1;
$DOCVS = 0;
+if (-f '/tmp/rss.cache') {
+ $CACHE = retrieve('/tmp/rss.cache');
+}
+
$ENV{CVS_RSH} = '/Users/ranger/bin/ssh.sh';
print "- updating cvs repository... ";
`mkdir -p '$PREFIX'`;
-`cd $PREFIX; cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/fink co dists packages
>$PREFIX/cvs.log 2>&1`;
+#`cd $PREFIX; cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/fink co dists packages
>$PREFIX/cvs.log 2>&1`;
+`cd $PREFIX; cvs -d :ext:[EMAIL PROTECTED]:/cvsroot/fink co dists packages
>$PREFIX/cvs.log 2>&1`;
print "done\n";
print "- searching for new info files...\n";
find(\&find_infofiles, $PREFIX);
-print "- generating RSS... ";
+print "- generating RSS...\n";
make_rss(\%STABLE_PACKAGES, 'Stable');
make_rss(\%UNSTABLE_PACKAGES, 'Unstable');
-print "done\n";
+
+store($CACHE, '/tmp/rss.cache');
if ($SCP) {
print "- copying feeds to the Fink website... ";
@@ -136,6 +146,13 @@
for my $package (sort { $packagehash->{$b}->{'date'} <=>
$packagehash->{$a}->{'date'} } keys %{$packagehash}) {
$package = $packagehash->{$package};
+ #print "name = ", $package->{'package'}, ", version = ",
$package->{'version'} . "-" . $package->{'revision'}, "\n";
+ #print "cache = ", $CACHE->{$tree}->{$package->{'package'}}, "\n";
+
+ next if ($CACHE->{$tree}->{$package->{'package'}} eq
$package->{'version'} . '-' . $package->{'revision'});
+ $CACHE->{$tree}->{$package->{'package'}} = $package->{'version'} . '-'
. $package->{'revision'};
+
+ print " - ", $package->{'package'}, " ", $package->{'version'} . "-"
. $package->{'revision'}, "\n";
if (not exists $package->{'descdetail'} or $package->{'descdetail'} =~
/^\s*$/gs) {
$description = $package->{'description'};
} else {
@@ -169,19 +186,19 @@
sub find_infofiles {
return unless (/\.info$/);
+ return unless ($File::Find::name =~ /dists\/10\.2\//);
my @stat = stat($File::Find::name) or die "can't stat $_: $!\n";
return unless ($stat[9] >= $CUTOFF);
my $text;
open(FILEIN, $File::Find::name) or die "can't open $File::Find::name: $!\n";
- print " - $_\n";
{ local $/ = undef; $text = <FILEIN>; }
my $hash = parse_keys($text);
close(FILEIN);
next unless (exists $hash->{'package'});
- $hash->{'date'} = $stat[9];
+ $hash->{'date'} = $stat[9];
if ($DOCVS) {
($hash->{'cvsauthor'}, $hash->{'cvslog'}) =
get_cvs_log($File::Find::dir, $File::Find::name);
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits