r53070 - in /trunk/dh-make-perl: debian/changelog lib/DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Fri Feb 19 20:52:33 UTC 2010
Author: dmn
Date: Fri Feb 19 20:52:27 2010
New Revision: 53070
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53070
Log:
--refresh: overwrite backups of files under debian/
a warning is issued in verbose mode
Discussion at http://lists.debian.org/debian-perl/2010/02/msg00040.html
Modified:
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=53070&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Fri Feb 19 20:52:27 2010
@@ -1,3 +1,10 @@
+dh-make-perl (0.65) UNRELEASED; urgency=low
+
+ * in --refresh mode, overwrite the backups of the modified files under
+ debian/
+
+ -- Damyan Ivanov <dmn at debian.org> Fri, 19 Feb 2010 22:47:26 +0200
+
dh-make-perl (0.64) unstable; urgency=low
[ Damyan Ivanov ]
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=53070&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Fri Feb 19 20:52:27 2010
@@ -144,7 +144,8 @@
=item backup_file(file_name)
-Creates a backup copy of the specified file by adding C<.bak> to its name.
+Creates a backup copy of the specified file by adding C<.bak> to its name. If
+the backup already exists, it is overwritten.
Does nothing unless the C<backups> option is set.
@@ -153,8 +154,11 @@
sub backup_file {
my( $self, $file ) = @_;
- copy( $file, "$file.bak" )
- if $self->cfg->backups;
+ if ( $self->cfg->backups ) {
+ warn "W: overwriting $file.bak\n"
+ if -e "$file.bak" and $self->cfg->verbose;
+ copy( $file, "$file.bak" );
+ }
}
sub run {
@@ -198,16 +202,6 @@
$self->main_dir( $ARGV[0] || '.' );
print "Engaging refresh mode in " . $self->main_dir . "\n"
if $self->cfg->verbose;
-
- die $self->debian_file('rules.bak') . " already exists. Aborting!\n"
- if ( -e $self->debian_file('rules.bak') and 'rules' ~~ $self->cfg->only );
-
- die $self->debian_file('copyright.bak')
- . " already exists. Aborting!\n"
- if ( -e $self->debian_file('copyright.bak') and 'copyright' ~~ $self->cfg->only );
-
- die $self->debian_file('control.bak') . " already exists. Aborting!\n"
- if ( -e $self->debian_file('control.bak') and 'control' ~~ $self->cfg->only );
$self->process_meta;
( $pkgname, $version )
More information about the Pkg-perl-cvs-commits
mailing list