[libcatalyst-modules-extra-perl] 01/07: no more tarballs/

Damyan Ivanov dmn at moszumanska.debian.org
Fri May 16 08:24:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to branch master
in repository libcatalyst-modules-extra-perl.

commit 89a0e2b159f8d4fd4a4c92dc9d7fa86712be7b15
Author: Damyan Ivanov <dmn at debian.org>
Date:   Fri May 16 07:42:56 2014 +0000

    no more tarballs/
---
 debian/copyright                 |   2 +-
 tarballs/check-upstream-versions | 224 ---------------------------------------
 tarballs/packages.cfg            |  28 -----
 3 files changed, 1 insertion(+), 253 deletions(-)

diff --git a/debian/copyright b/debian/copyright
index 5d397e1..fbc5656 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,6 +1,6 @@
 Format-Specification: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=59
 
-Files: debian/*, tarballs/check-upstream-versions, tarballs/packages.cfg
+Files: debian/*
 Copyright: 2009-2010, Jonathan Yu <frequency at cpan.org>
  2006, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
  2011, gregor herrmann <gregoa at debian.org>
diff --git a/tarballs/check-upstream-versions b/tarballs/check-upstream-versions
deleted file mode 100755
index 75da03d..0000000
--- a/tarballs/check-upstream-versions
+++ /dev/null
@@ -1,224 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use File::Glob qw/:glob/;
-use File::Basename;
-use File::Copy;
-use Data::Dump qw/pp dump/;
-use LWP::Simple; 
-use List::Util qw/maxstr max/;
-use Config::General;
-use Text::SimpleTable;
-use Text::Wrap;
-
-$Text::Wrap::columns = 78;
-$Text::Wrap::separator = "\n ";
-my %indexes  = ();
-
-my %cfg = Config::General->new( -ConfigFile => 'packages.cfg' )->getall;
-
-#--- switch off buffering
-$|++;
-
-#----------------------------------------------------------------------------
-# add/update packages & numbers to debian/control file
-#----------------------------------------------------------------------------
-sub control($$)
-{    
-	my ($files, $config) = @_;
-	my $control = '../debian/control';
-	my $output = '';
-	my $copyright  = '../debian/copyright';
-	my $coutput = $config->{'debcopystart'}."\n";
-	
-	open( FD, '<', $control ) or die "Cannot open $control\n";
-	my @lines = <FD>;
-	close( FD );
-			
-	for my $line (@lines)
-	{	
-		$output .= $line;
-		if ($line =~ /Currently the following modules are included/)
-		{
-			
-			for my $file (@$files)
-			{
-				my ($dir, $base, $version, $suffix) = $file =~ m!(\d+)/(.+)\-([\d\.]+)(\.tar\.gz)!;
-				my $key = $base;
-				$base =~ s/\-/::/g;
-				$output .= qq{ .\n $base\n };
-				
-				#--- get data from config file and prepare output
-				if (defined $config->{$key}->{'description'})
-				{
-					$output .= wrap("","",$config->{$key}->{'description'})."\n";
-				}
-				else
-				{
-					print "$key not exist in config file or has not defined 'description' section\n";					
-					exit(1);
-				}
-				if (defined $config->{$key}->{'copyright'})
-				{
-					$coutput .= qq{\nFiles: tarballs/$file\n};
-					$coutput .= qq{Copyright:};
-					if (ref $config->{$key}->{'copyright'} eq 'ARRAY')
-					{
-						foreach my $copyright (@{$config->{$key}->{'copyright'}})
-						{
-							$coutput .= qq{ $copyright\n};
-						}
-					}
-					else
-					{
-						$coutput .= qq{ $config->{$key}->{'copyright'}\n};
-					}
-				}
-				else
-				{
-					print "$key not exist in config file or has not defined 'copyright' section\n";					
-					exit(1);
-				}
-				if (defined $config->{$key}->{'maintainer'})
-				{
-					$coutput .= qq{X-Upstream-Maintainers:};
-					if (ref $config->{$key}->{'maintainer'} eq 'ARRAY')
-					{
-						foreach my $maintainer (@{$config->{$key}->{'maintainer'}})
-						{
-							$coutput .= qq{ $maintainer\n};
-						}
-					}
-					else
-					{
-						$coutput .= qq{ $config->{$key}->{'maintainer'}\n};
-					}
-				}
-				else
-				{
-					print "$key not exist in config file or has not defined 'maintainer' section\n";					
-					exit(1);
-				}
-				$coutput .= qq{License: Artistic or GPL-1+\n};
-				if (defined $config->{$key}->{'comment'})
-				{
-					$coutput .= qq{X-Comment:};
-					if (ref $config->{$key}->{'comment'} eq 'ARRAY')
-					{
-						foreach my $comment (@{$config->{$key}->{'comment'}})
-						{
-							$coutput .= qq{ $comment\n};
-						}
-					}
-					else
-					{
-						$coutput .= qq{ $config->{$key}->{'comment'}\n};
-					}
-				}
-			}
-			last;
-		}				
-	}
-	$coutput .= "\n".$config->{'debcopyright'}."\n";
-	open( FD, '>', $control.".new" ) or die "Cannot open $control.new\n";
-	print FD $output;
-	close( FD );
-	move($control.".new", $control);
-
-	open( FD, '>', $copyright ) or die "Cannot open $copyright\n";
-	print FD $coutput;
-	close( FD );
-}
-
-#----------------------------------------------------------------------------
-# check upstream versions
-#----------------------------------------------------------------------------
-sub check($$)
-{
-	my ($files, $config) = @_;
-	my @urls = ();
-	my %seen;
-
-	my $table = Text::SimpleTable->new([3, 'Dir'], [50, 'Module'], [10, 'Debian'], [10, 'Upstream'], [30, 'Comment']);
-
-	for my $file (@$files)
-	{
-		my $current_version = 0;
-		my $upstream_version = 'missing';
-		my $upstream_link = "";		
-	
-		#--- check package's current version 
-		my ($dir, $base, $version, $suffix) = $file =~ m!(\d+)/(.+)\-([\d\.]+)(\.tar\.gz)!;		
-		
-		$current_version = $version;
-		#--- check if watch exist, read url	
-		if (defined $config->{$base}->{'watch'})
-		{
-			my $url = $config->{$base}->{'watch'};
-			
-			#--- get "directory" part & "file" part
-			my ($u_dir, $u_file) = $url =~ m!(.+/)(.+)$!;
-			
-			#--- now take index file with directories								
-			unless (defined($indexes{$u_dir}))
-			{
-				#--- cache result
-				$indexes{$u_dir} = get($u_dir);
-			}
-							
-			my @found = $indexes{$u_dir} =~ m!$u_file!g;
-			$upstream_version = maxstr(@found);
-			my @links = $indexes{$u_dir} =~ m!"(/CPAN/.+$base-$upstream_version.+)"!;
-			$upstream_link = qq{http://search.cpan.org$links[0]}; 
-		}
-		else
-		{
-			print "$file not exist in config file or has not defined 'watch' section\n";
-			exit(1);
-		}
-		
-		my $comment;
-		$comment = "up to date" if ($current_version == $upstream_version);
-		$comment = "newer than upstream version!" if ($current_version > $upstream_version);
-		if ($current_version < $upstream_version)		
-		{
-			$comment =  "new upstream version!";
-			push @urls,	qq{$dir $upstream_link};
-		}
-		$table->row($dir, $base, $current_version, $upstream_version, $comment);
-		$seen{$base}++;		
-	}	
-
-	print $table->draw;
-	if (scalar at urls)
-	{
-		for my $url (@urls)
-		{
-			print $url."\n";
-		}
-	}
-	foreach my $key (keys %seen)
-	{
-		if ($seen{$key} > 1)
-		{
-			print qq{$key is more than once in directory!\n}; 
-		}
-	}
-}
-
-if (defined($ARGV[0]))
-{
-	if ($ARGV[0] eq 'control')
-	{
-		#--- add/update packages & numbers to debian/control file
-		my @f = bsd_glob('??/*.tar.gz');
-		control( \@f, \%cfg );
-	}	
-}
-else
-{
-	#--- check upstream versions
-	my @f = bsd_glob('??/*.tar.gz');
-	check( \@f, \%cfg );
-}
-
diff --git a/tarballs/packages.cfg b/tarballs/packages.cfg
deleted file mode 100644
index 3b56fb1..0000000
--- a/tarballs/packages.cfg
+++ /dev/null
@@ -1,28 +0,0 @@
-
-debcopystart <<EOF
-Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59
-
-Files: debian/*, tarballs/check-upstream-versions, tarballs/packages.cfg
-Copyright: 2009-2010, Jonathan Yu <frequency at cpan.org>
- 2006, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
- 2011, gregor herrmann <gregoa at debian.org>
-License: Artistic or GPL-1+
-EOF
-
-debcopyright <<EOF
-License: Artistic
- This program is free software; you can redistribute it and/or modify
- it under the terms of the Artistic License, which comes with Perl.
- .
- On Debian systems, the complete text of the Artistic License can be
- found in `/usr/share/common-licenses/Artistic'.
-
-License: GPL-1+
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
- .
- On Debian systems, the complete text of the GNU General Public
- License version 1 can be found in `/usr/share/common-licenses/GPL-1'.
-EOF

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatalyst-modules-extra-perl.git



More information about the Pkg-perl-cvs-commits mailing list