The following commit has been merged in the master branch:
commit ab96eed611a702aaca096c7c7e64d1e66677bb95
Author: James Vega <[email protected]>
Date: Fri Feb 18 23:54:21 2011 -0500
debchange: Require saving the changelog when using --closes.
Signed-off-by: James Vega <[email protected]>
diff --git a/debian/changelog b/debian/changelog
index fc7a408..f771c25 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,8 +14,11 @@ devscripts (2.10.71) UNRELEASED; urgency=low
The local cache should be used when accessible, but not prevent downloads
when it isn't. (Closes: #599354)
* build-rdeps: Remove hard-coded path for grep-dctrl.
- * debchange: Require an argument for the --allow-lower-version option.
- (Closes: #597675)
+ * debchange:
+ + Require an argument for the --allow-lower-version option. (Closes:
+ #597675)
+ + Since the entry added by --closes requires editing anyway, require the
+ user to save the changelog for it update the original changelog.
[ Patrick Schoenfeld ]
* build-rdeps: Update release_pattern for the new InRelease release files,
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index 7e110c0..f72f4dd 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! /usr/bin/perl
# debchange: update the debian changelog using your favorite visual editor
# For options, see the usage message below.
@@ -30,6 +30,7 @@
use 5.008; # We're using PerlIO layers
use strict;
+use warnings;
use open ':utf8'; # changelogs are written with UTF-8 encoding
use filetest 'access'; # use access rather than stat for -w
# for checking whether user names are valid and making format() behave
@@ -1398,16 +1399,14 @@ if ((!$TEXT and !$EMPTY_TEXT and ! ($opt_create and
$opt_empty)) or @closes_text
system("sensible-editor +$line $changelog_path.dch") == 0 or
fatal "Error editing $changelog_path";
- if (! @closes_text) { # so must have a changelog added by hand
- my $newmtime = (stat("$changelog_path.dch"))[9];
- defined $newmtime or fatal
- "Error getting modification time of temporary $changelog_path: $!";
- if ($mtime == $newmtime && ! $opt_create &&
- (!$opt_r || ($opt_r && $opt_force_save_on_release))) {
+ my $newmtime = (stat("$changelog_path.dch"))[9];
+ defined $newmtime or fatal
+ "Error getting modification time of temporary $changelog_path: $!";
+ if ($mtime == $newmtime && ! $opt_create &&
+ (!$opt_r || ($opt_r && $opt_force_save_on_release))) {
- warn "$progname: $changelog_path unmodified; exiting.\n";
- exit 0;
- }
+ warn "$progname: $changelog_path unmodified; exiting.\n";
+ exit 0;
}
}
@@ -1457,21 +1456,23 @@ if ((basename(cwd()) =~
m%^\Q$PACKAGE\E-\Q$UVERSION\E$%) &&
exit 0;
-
-# Format for standard Debian changelogs
-format CHANGELOG =
+{
+ no warnings 'uninitialized';
+ # Format for standard Debian changelogs
+ format CHANGELOG =
* ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$CHGLINE
~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$CHGLINE
.
-# Format for NEWS files.
-format NEWS =
+ # Format for NEWS files.
+ format NEWS =
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$CHGLINE
~~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$CHGLINE
.
+}
my $linecount=0;
sub format_line {
--
Git repository for devscripts
--
To unsubscribe, send mail to [email protected].