r76592 - in /trunk/dh-make-perl: TODO lib/DhMakePerl/Command/make.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sun Jun 26 13:49:10 UTC 2011
Author: dmn
Date: Sun Jun 26 13:49:08 2011
New Revision: 76592
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=76592
Log:
make: use pristine-tar to set up the pristine-tar branch
Modified:
trunk/dh-make-perl/TODO
trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm
Modified: trunk/dh-make-perl/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/TODO?rev=76592&op=diff
==============================================================================
--- trunk/dh-make-perl/TODO (original)
+++ trunk/dh-make-perl/TODO Sun Jun 26 13:49:08 2011
@@ -42,4 +42,3 @@
* Support dh8 (optional or default) - no need for finding debhelper versions etc.
* process_meta in lib/DhMakePerl/Command/Packaging.pm only checks for META.yml, and not
META.json. And there are more moderm modules to deal with both in the meantime (CPAN::Meta*).
-* in --vcs git mode, create the Git repository with proper usptream/pristine-tar branches
Modified: trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm?rev=76592&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm Sun Jun 26 13:49:08 2011
@@ -100,6 +100,8 @@
dirname($tarball), $self->pkgname, $self->version );
move( $tarball, $dest ) or die "move($tarball, $dest): $!";
+
+ $tarball = $dest;
}
if ( -d $self->debian_dir ) {
@@ -198,7 +200,7 @@
$self->install_package if $self->cfg->install;
print "--- Done\n" if $self->cfg->verbose;
- $self->setup_git_repository()
+ $self->setup_git_repository($tarball)
if $self->cfg->{pkg_perl}
and $self->cfg->{vcs} eq 'git';
@@ -585,7 +587,7 @@
}
sub setup_git_repository {
- my $self = shift;
+ my ( $self, $tarball ) = @_;
use Git;
use IO::Dir;
@@ -602,7 +604,10 @@
push @upstream_files, $f;
}
$git->command( 'add', @upstream_files );
- $git->command( 'commit', '-m', "Import original source of ".$self->perlname.' '.$self->version );
+ $git->command( 'commit', '-m',
+ "Import original source of "
+ . $self->perlname . ' '
+ . $self->version );
$git->command( qw( checkout -b master upstream ) );
$git->command( 'add', 'debian' );
$git->command( 'commit', '-m', 'Initial packaging by dh-make-perl' );
@@ -611,6 +616,10 @@
sprintf( "ssh://git.debian.org/git/pkg-perl/packages/%s.git",
$self->pkgname ),
);
+
+ $ENV{GIT_DIR} = File::Spec->catdir( $self->main_dir, '.git' );
+ system( 'pristine-tar', 'commit', $tarball ) >= 0
+ or warn "error running pristine-tar: $!\n";
}
=item warning I<string> ...
More information about the Pkg-perl-cvs-commits
mailing list