OK, changes pushed - including a further fix to skip the "Drop NMU revision" block in the distributor=Ubuntu case.
I hope/believe I've now caught all the edge-cases, but I certainly agree the fact that I had to patch two up after initial review isn't entirely comforting.
For comparison, the one-liner most direct patch for just the immediate bug would be:
- if ($distributor eq 'Ubuntu' and $start !~ /(build|ubuntu|prop(osed)?)(\d+\.)*$/ and not $opt_U and not $opt_R) {
+ if ($distributor eq 'Ubuntu' and $start !~ /(build|ubuntu|prop(osed)?)(\d+\.)*$/ and not $opt_U and ($opt_i or $opt_s)) {
What I've tried to do instead with this branch is to properly localize the Ubuntu-specific changes to the specific increment operation they seek to override, rather than have them stuck on the front of a long cascading if-elsif where they can potentially override more than they are supposed to. An additional (though admittedly very minor) bug that this branch fixes that the one-liner does not is the processing of 'dch --news -i', which is supposed to add a new NEWS entry matching the current changelog version - the current code can increment the version added to NEWS beyond the current top changelog entry.
OK, changes pushed - including a further fix to skip the "Drop NMU revision" block in the distributor=Ubuntu case.
I hope/believe I've now caught all the edge-cases, but I certainly agree the fact that I had to patch two up after initial review isn't entirely comforting.
For comparison, the one-liner most direct patch for just the immediate bug would be:
- if ($distributor eq 'Ubuntu' and $start !~ /(build| ubuntu| prop(osed) ?)(\d+\ .)*$/ and not $opt_U and not $opt_R) { ubuntu| prop(osed) ?)(\d+\ .)*$/ and not $opt_U and ($opt_i or $opt_s)) {
+ if ($distributor eq 'Ubuntu' and $start !~ /(build|
What I've tried to do instead with this branch is to properly localize the Ubuntu-specific changes to the specific increment operation they seek to override, rather than have them stuck on the front of a long cascading if-elsif where they can potentially override more than they are supposed to. An additional (though admittedly very minor) bug that this branch fixes that the one-liner does not is the processing of 'dch --news -i', which is supposed to add a new NEWS entry matching the current changelog version - the current code can increment the version added to NEWS beyond the current top changelog entry.