When prompting the user for a patch name, if they type Ctrl-D the variable reading from STDIN will be initialized to undef, but we were acting on it anyway. Catch that case.
@@ -8,6 +8,7 @@ dpkg (1.17.14) UNRELEASED; urgency=low
* Bump Standards-Version to 3.9.6 (no changes needed).
* Disable unused run-time type information for dselect.
* Fix compiler flag detection with non-GCC compilers in the build system.
+ * Fix perl warning on dpkg-source when typing Ctrl-D on patch name prompt.
[ Raphaël Hertzog ]
* Explain better in deb-triggers(5) why interest/activate-noawait should be
@@ -654,7 +654,9 @@ sub do_commit {
while (_is_bad_patch_name($dir, $patch_name)) {
# Ask the patch name interactively
print _g('Enter the desired patch name: ');
- chomp($patch_name = <STDIN>);
+ $patch_name = <STDIN>;
+ next unless defined $patch_name;
+ chomp $patch_name;
$patch_name =~ s/\s+/-/g;
$patch_name =~ s/\///g;
}