Author: ranger
Date: Mon Apr 13 22:16:05 2009
New Revision: 1493
URL:
<http://svn.finkproject.org/websvn/listing.php?sc=1&rev=1493&repname=user%3a+ranger>
Log:
script updates
Modified:
trunk/experimental/scripts/Fink/FinkVersion.pm
trunk/experimental/scripts/generate-distfiles-and-finkinfo-mirror.pl
trunk/experimental/scripts/rss-newpackages.pl
Modified: trunk/experimental/scripts/Fink/FinkVersion.pm
URL:
<http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/scripts/Fink/FinkVersion.pm&rev=1493&repname=user%3a+ranger>
==============================================================================
--- trunk/experimental/scripts/Fink/FinkVersion.pm (original)
+++ trunk/experimental/scripts/Fink/FinkVersion.pm Mon Apr 13 22:16:05 2009
@@ -4,7 +4,7 @@
#
# Fink - a package manager that downloads source and installs it
# Copyright (c) 2001 Christoph Pfisterer
-# Copyright (c) 2001-2004 The Fink Package Manager Team
+# Copyright (c) 2001-2009 The Fink Package Manager Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
#
package Fink::FinkVersion;
@@ -28,11 +28,8 @@
require Exporter;
our @ISA = qw(Exporter);
-our @EXPORT_OK = qw(&fink_version &distribution_version &pkginfo_version
&max_info_level);
+our @EXPORT_OK = qw(&fink_version &default_binary_version &max_info_level
&get_arch);
our %EXPORT_TAGS = ('ALL' => \...@export_ok);
-
-use Fink::Config qw($basepath);
-use Fink::Command qw(cat);
=head1 NAME
@@ -44,8 +41,8 @@
use Fink::FinkVersion qw(:ALL);
my $fink_version = fink_version;
- my $dist_version = distribution_version;
- my $pkginfo_version = pkginfo_version;
+ my $arch = get_arch;
+ my $default_version = default_binary_version($distribution);
my $max_info_level = max_info_level;
=head1 DESCRIPTION
@@ -70,77 +67,47 @@
=cut
sub fink_version {
- return "0.0";
+ return "0.28.99.cvs";
}
-=item distribution_version
+=item get_arch
- my $dist_version = distribution_version
+ my $arch = get_arch;
-Returns the fink distribution version you're currently using.
+Returns the architecture string to be used on this platform. For
+example, "powerpc" for ppc.
+
+=for private
+
+Callers assume the value is all-lowercase, but some also assume it is
+the canonical form. So we can't use lc() here without breaking the
+latter if there are any cases of canonical forms that have upper-case
+chars. If we find any, have to check our callers for incorrect
+assumptions.
=cut
-sub distribution_version {
- my $dv;
- if (-f "$basepath/fink/dists/VERSION") {
- chomp($dv = cat "$basepath/fink/dists/VERSION");
- } elsif (-f "$basepath/fink/VERSION") {
- chomp($dv = cat "$basepath/fink/VERSION");
- } elsif (-f "$basepath/etc/fink-release") {
- chomp($dv = cat "$basepath/etc/fink-release");
- } else {
- $dv = "unknown";
- }
- return $dv;
+sub get_arch {
+ return "i386";
}
+=item default_binary_version
-=item pkginfo_version
+ my $b_dist_version = default_binary_version($distribution);
- my $pkginfo_version = pkginfo_version;
-Returns from whence you updated your packages. If you're using a point
-release it will return that. Otherwise if you're using one of the dynamic
-methods...
-
- rsync packages updated via rsync
- cvs packages updated via cvs
+Returns the most recent (binary) fink distribution version
+corresponding to $distribution, or undef if there is no known binary
+distro for the given $distribution.
=cut
-sub pkginfo_version {
- my $pv = "0";
- my ($fn, $v);
-# first, look in the new location for stamp files
- foreach $fn (glob("$basepath/fink/dists/stamp-*")) {
- if ($fn =~ m{/stamp-rsync}) {
- return "rsync";
- } elsif ($fn =~ m{/stamp-cvs}) {
- return "cvs";
- } elsif ($fn =~ m{/stamp-rel-(.+)$}) {
- $v = $1;
- $pv = $v if ($v gt $pv);
- }
- }
-# if we haven't returned yet, and we didn't set the value of $v, look in the
old location
- if (not defined $v) {
- foreach $fn (glob("$basepath/fink/stamp-*")) {
- if ($fn =~ m{/stamp-rsync}) {
- return "rsync";
- } elsif ($fn =~ m{/stamp-cvs}) {
- return "cvs";
- } elsif ($fn =~ m{/stamp-rel-(.+)$}) {
- $v = $1;
- $pv = $v if ($v gt $pv);
- }
- }
- }
- $pv = &distribution_version() if $pv eq "0";
- return $pv;
+sub default_binary_version {
+ my $distribution = shift;
+ my %bindists = ("10.2-gcc3.3" => "0.6.4", "10.3" => "0.7.2",
"10.4-transitional" => "0.8.0", "10.4" => "0.8.1", "10.5" => "0.9.0");
+ return $bindists{$distribution};
}
-
=item max_info_level
@@ -156,7 +123,10 @@
sub max_info_level {
# 1 is the original level (same as none specified)
# 2 gives percent-expansion in Package: and multiple Type: syntax.
- return 2;
+ # 3 gives leading-whitespace removal, removes RFC-822, adds comment
support
+ # in pkglist fields.
+ # 4 allows %lib in ConfigureParams field, and adds %V
+ return 4;
}
=back
Modified: trunk/experimental/scripts/generate-distfiles-and-finkinfo-mirror.pl
URL:
<http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/scripts/generate-distfiles-and-finkinfo-mirror.pl&rev=1493&repname=user%3a+ranger>
==============================================================================
--- trunk/experimental/scripts/generate-distfiles-and-finkinfo-mirror.pl
(original)
+++ trunk/experimental/scripts/generate-distfiles-and-finkinfo-mirror.pl Mon
Apr 13 22:16:05 2009
@@ -81,6 +81,7 @@
while (<FILEIN>)
{
$_ =~ s/\...@version\@/${finkversion}/gs;
+ $_ =~ s/\...@architecture\@/0.28.0/gs;
print FILEOUT;
}
close (FILEOUT);
@@ -194,7 +195,8 @@
$Fink::Config::config = Fink::Config->new_from_properties({
basepath => $WORKDIR,
distribution => $dist,
- downloadmethod => 'lftpget',
+# downloadmethod => 'lftpget',
+ downloadmethod => 'curl',
architecture => $arch,
downloadtimeout => 3600, # try up to 1 hour to download
something
});
Modified: trunk/experimental/scripts/rss-newpackages.pl
URL:
<http://svn.finkproject.org/websvn/diff.php?path=/trunk/experimental/scripts/rss-newpackages.pl&rev=1493&repname=user%3a+ranger>
==============================================================================
--- trunk/experimental/scripts/rss-newpackages.pl (original)
+++ trunk/experimental/scripts/rss-newpackages.pl Mon Apr 13 22:16:05 2009
@@ -46,10 +46,12 @@
$STABLE_RSS
$UNSTABLE_RSS
+ $UNSTABLE_PARENT_RSS
%EXPERIMENTAL_PACKAGES
%STABLE_PACKAGES
%UNSTABLE_PACKAGES
+ %UNSTABLE_PARENT_PACKAGES
%CVS_FILES
@@ -153,9 +155,10 @@
#print Dumper(%EXPERIMENTAL_PACKAGES), "\n";
print "- generating RSS...\n";
-make_rss( \%STABLE_PACKAGES, 'Stable' );
-make_rss( \%UNSTABLE_PACKAGES, 'Unstable' );
-make_rss( \%EXPERIMENTAL_PACKAGES, 'Experimental' );
+make_rss( \%STABLE_PACKAGES, 'Stable' );
+make_rss( \%UNSTABLE_PACKAGES, 'Unstable' );
+make_rss( \%EXPERIMENTAL_PACKAGES, 'Experimental' );
+make_rss( \%UNSTABLE_PARENT_PACKAGES, 'Unstable - No Splitoffs' );
store( $CACHE, $PREFIX . '/rss.cache' ) if ( $CACHE and $DOCACHE );
@@ -341,6 +344,7 @@
{
my $packagehash = shift;
my $tree = shift;
+ my $outputtree = shift || $tree;
my $split_rss;
if ( $tree ne "Experimental" )
@@ -511,16 +515,24 @@
}
else
{
+# my $prettytree = $package->{'tree'};
+# if ($prettytree >= 10.4) {
+# $prettytree = "10.4+";
+# }
$link =
'http://pdb.finkproject.org/pdb/package.php/'
. $package->{'package'} . '#'
. $package->{'version'} . '-'
. $package->{'revision'};
+# $title =
+# $packagestring . ' ('
+# . $package->{'description'} . ', '
+# . $prettytree
+# . ' tree)';
$title =
$packagestring . ' ('
- . $package->{'description'} . ', '
- . $package->{'tree'}
- . ' tree)';
+ . $package->{'description'}
+ . ')';
}
$link = encode_entities($link);
$title = encode_entities($title);
@@ -551,29 +563,35 @@
}
} ## end for my $package ( sort ...
- my $lctree = lc($tree);
- my $savefile = $DOSCP ? "fink-$lctree.rdf.new" : "fink-$lctree.rdf";
+ my $lctree = lc($outputtree);
+ $lctree =~ s/[^[:alnum:]]+/-/gs;
+ $lctree =~ s/-$//gs;
+ #my $savefile = $DOSCP ? "fink-$lctree.rdf.new" : "fink-$lctree.rdf";
+ my $savefile = "fink-$lctree.rdf";
$rss->save( $TOPDIR . '/' . $savefile ) or die "can't save rss: $!\n";
push( @FILES, "$TOPDIR/fink-$lctree.rdf" );
- for my $key ( sort keys %$split_rss )
- {
- if ( $key =~ /^experimental\// )
- {
- my $filename = "fink-$key.rdf";
- $filename =~ s#/#-#g;
- my $savefile = $DOSCP ? $filename . '.new' : $filename;
- $split_rss->{$key}->save( $TOPDIR . '/' . $savefile )
- or die "can't save rss: $!\n";
- push( @FILES, $TOPDIR . '/' . $filename );
- }
- else
- {
- my $savefile =
- $DOSCP ? "fink-$key-$lctree.rdf.new" :
"fink-$key-$lctree.rdf";
- $split_rss->{$key}->save( $TOPDIR . '/' . $savefile )
- or die "can't save rss: $!\n";
- push( @FILES, "$TOPDIR/fink-$key-$lctree.rdf" );
+ if ($tree != $outputtree) {
+ for my $key ( sort keys %$split_rss )
+ {
+ if ( $key =~ /^experimental\// )
+ {
+ my $filename = "fink-$key.rdf";
+ $filename =~ s#/#-#g;
+ #my $savefile = $DOSCP ? $filename . '.new' :
$filename;
+ my $savefile = $filename;
+ $split_rss->{$key}->save( $TOPDIR . '/' .
$savefile )
+ or die "can't save rss: $!\n";
+ push( @FILES, $TOPDIR . '/' . $filename );
+ }
+ else
+ {
+ #my $savefile = $DOSCP ?
"fink-$key-$lctree.rdf.new" : "fink-$key-$lctree.rdf";
+ my $savefile = "fink-$key-$lctree.rdf";
+ $split_rss->{$key}->save( $TOPDIR . '/' .
$savefile )
+ or die "can't save rss: $!\n";
+ push( @FILES, "$TOPDIR/fink-$key-$lctree.rdf" );
+ }
}
}
} ## end sub make_rss
@@ -617,8 +635,7 @@
for my $index ( 0 .. $#versions )
{
$versions[$index]->{'type'} = 'info';
- if ( $versions[$index]->get_info_filename() =~
- /$DISTDIR\/([^\/]+)\// )
+ if ( $versions[$index]->get_info_filename() =~
/$DISTDIR\/([^\/]+)\// )
{
$versions[$index]->{'tree'} = $1;
}
@@ -684,8 +701,7 @@
for my $version (@versions)
{
$version->{'filename'} = $File::Find::name;
- if ( $version->{'type'} eq 'info'
- and $version->get_info_filename() =~
/$DISTDIR\/([^\/]+)\// )
+ if ( $version->{'type'} eq 'info' and
$version->get_info_filename() =~ /$DISTDIR\/([^\/]+)\// )
{
$version->{'tree'} = $1;
}
@@ -705,6 +721,9 @@
elsif ( $File::Find::name =~
m#$DISTDIR/$version->{'tree'}/unstable/# )
{
$UNSTABLE_PACKAGES{ $tree . '/' . $version->get_name()
} = $version;
+ if ( not $version->has_parent() ) {
+ $UNSTABLE_PARENT_PACKAGES{ $tree . '/' .
$version->get_name() } = $version;
+ }
}
else
{
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs