r47906 - in /people/ansgar/source-v3/libcatalyst-modules-perl/debian: README.source bundle-manager check-upstream-versions rename-tarballs
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Sun Nov 29 11:15:20 UTC 2009
Author: ansgar-guest
Date: Sun Nov 29 11:15:12 2009
New Revision: 47906
URL: http://svn.debian.org/wsvn/?sc=1&rev=47906
Log:
* rename check-upstream-versions to bundle-manager
* integrate rename-tarballs into bundle-manager
Added:
people/ansgar/source-v3/libcatalyst-modules-perl/debian/bundle-manager
- copied, changed from r47900, people/ansgar/source-v3/libcatalyst-modules-perl/debian/check-upstream-versions
Removed:
people/ansgar/source-v3/libcatalyst-modules-perl/debian/check-upstream-versions
people/ansgar/source-v3/libcatalyst-modules-perl/debian/rename-tarballs
Modified:
people/ansgar/source-v3/libcatalyst-modules-perl/debian/README.source
Modified: people/ansgar/source-v3/libcatalyst-modules-perl/debian/README.source
URL: http://svn.debian.org/wsvn/people/ansgar/source-v3/libcatalyst-modules-perl/debian/README.source?rev=47906&op=diff
==============================================================================
--- people/ansgar/source-v3/libcatalyst-modules-perl/debian/README.source (original)
+++ people/ansgar/source-v3/libcatalyst-modules-perl/debian/README.source Sun Nov 29 11:15:12 2009
@@ -3,7 +3,7 @@
After changing the version number in debian/changelog, you have to rename the
*.orig.tar.gz files. The command
- sh debian/rename-tarballs <old-version> <new-version>
+ perl debian/bundle-manager rename-tarballs <old-version> <new-version>
will do this for you. If you omit the version numbers, the script will take
the versions from the two most recent changelog entries.
@@ -11,12 +11,12 @@
-----------------
Run
- perl debian/check-upstream-versions
+ perl debian/bundle-manager
to see a list of modules that need to be updated.
In order to update a new module, first make sure that no patches are currently
applied and then run the command
- perl debian/check-upstream-versions download <module>
+ perl debian/bundle-manager download <module>
This should download the newest upstream release for <module> and extract it.
If the dependencies change, you might have to edit debian/module-list.
@@ -25,10 +25,10 @@
-------------------
Add the new module to debian/packages.cfg, then download the latest release by
- perl debian/check-upstream-versions download <module>
+ perl debian/bundle-manager download <module>
Then update debian/copyright and the package description in debian/control with
- perl debian/check-upstream-versions control
+ perl debian/bundle-manager control
Finally add the new module to debian/module-list after all modules the new module
depends on.
Copied: people/ansgar/source-v3/libcatalyst-modules-perl/debian/bundle-manager (from r47900, people/ansgar/source-v3/libcatalyst-modules-perl/debian/check-upstream-versions)
URL: http://svn.debian.org/wsvn/people/ansgar/source-v3/libcatalyst-modules-perl/debian/bundle-manager?rev=47906&op=diff
==============================================================================
--- people/ansgar/source-v3/libcatalyst-modules-perl/debian/check-upstream-versions (original)
+++ people/ansgar/source-v3/libcatalyst-modules-perl/debian/bundle-manager Sun Nov 29 11:15:12 2009
@@ -4,6 +4,7 @@
use File::Glob qw/:glob/;
use File::Basename;
use File::Copy;
+use File::Remove qw/remove/;
use Data::Dump qw/pp dump/;
use LWP::Simple;
use List::Util qw/maxstr max/;
@@ -215,7 +216,7 @@
}
print $table->draw;
- if (scalar at urls)
+ if (scalar @urls)
{
for my $url (@urls)
{
@@ -223,7 +224,7 @@
}
}
if (scalar @updates) {
- print "perl debian/check-upstream-versions download $_\n" for @updates;
+ print "perl debian/bundle-manager download $_\n" for @updates;
}
}
@@ -241,13 +242,36 @@
getstore($upstream_link, $file);
print "Remove old $module...\n";
- (system "rm", "-rf", $module) == 0
- or die "removing old module failed.";
+ remove(\1, $module);
print "Extracting new $module...\n";
mkdir $module;
(system "tar", "--strip=1", "-C", $module, "-xzvf", $file) == 0
or die "extracting new module failed.";
+}
+
+sub rename_tarballs($$$)
+{
+ my ($config, $old, $new) = @_;
+ my @changelog = changelog_parse(format => "rfc822", count => 2);
+ my $source = $changelog[0]->{source};
+
+ unless (defined $old && defined $new) {
+ $old = $changelog[1]->{version};
+ $new = $changelog[0]->{version};
+ }
+
+ print "$old\n$new\n";
+ my @tarballs = bsd_glob("../${source}_$old.orig*");
+ for my $tarball (@tarballs) {
+ my ($base, $comp, $ext) = $tarball =~ /^([^_]+)_\Q$old.orig\E(-[\w-]+)?\.tar\.(.+)$/;
+ die "Got confused by '$tarball'" unless defined $base && defined $ext;
+
+ my $tarball_new = "${base}_$new.orig" . ($comp // "") . ".tar.$ext";
+ print "mv $tarball $tarball_new\n";
+ move($tarball, $tarball_new)
+ or die "Move failed: $!";
+ }
}
if (defined($ARGV[0]))
@@ -267,6 +291,12 @@
}
download($module, \%cfg);
}
+ elsif ($ARGV[0] eq 'rename-tarballs')
+ {
+ shift;
+ my ($old, $new) = @_;
+ rename_tarballs(\%cfg, $old, $new);
+ }
}
else
{
More information about the Pkg-perl-cvs-commits
mailing list