Both changes are necessary to suppress the editor. I've updated the
changelog entry to say the patch suppresses the "initial release" line
when dch --create is given a changelog entry - thanks!

Though the code currently in debchange appears to be intentional it is
not correct and doesn't behave as documented:

The "initial release" text is assigned to @closes_text, and currently
the script launches the editor if @closes_text is populated. For this
reason the ' or $opt_create' test for launching the editor is a NOOP -
in the current code @closes_text is always populated if $opt_create is
true.

If @closes_text were *not* set (which my patch allows) then the test for
$opt_create would affect control flow. However, the test for $opt_create
is still no good - my patch to prevent @closes_text from being populated
requires that $opt_create be true and $TEXT be populated. This means
testing for $opt_create is going to launch the editor even though the
user passed in text on the command line. Passing text on the cmd line is
documented to *not* open the editor but instead run in batch mode.
Therefore the test for $opt_create needs to be removed.

Given that the documentation says that text passed on the cmd line is
"simply add[ed]" to the changelog I think it is reasonable to remove the
"initial release" text in this case.

-- 
dch --create always launches editor
https://bugs.launchpad.net/bugs/220733
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to