Merge lp:~maxb/ubuntu/lucid/devscripts/445432 into lp:ubuntu/lucid/devscripts
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~maxb/ubuntu/lucid/devscripts/445432 | ||||
| Merge into: | lp:ubuntu/lucid/devscripts | ||||
| Diff against target: |
68 lines (+19/-10) 2 files modified
debian/changelog (+8/-0) scripts/debchange.pl (+11/-10) |
||||
| To merge this branch: | bzr merge lp:~maxb/ubuntu/lucid/devscripts/445432 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| James Westby (community) | 2010-03-26 | Approve on 2010-03-31 | |
|
Review via email:
|
|||
Description of the Change
Please see bug 445432
| James Westby (james-w) wrote : | # |
| Max Bowsher (maxb) wrote : | # |
OK... here goes then: I begin by making a list of all of the "mode selection" options of dch:
-a Append
-e Edit
-r Release
-i Increment
-v Explicit version
-d From dir name
-n NMU
--bin-nmu BinNMU
-R Rebuild (-lbuild)
-q QA
-s Security
--bpo BPO
-l Local (suffix)
then I discounted those ones for which dch actually overrides the distributor back to Debian if they are used:
-n NMU
--bin-nmu BinNMU
-q QA
--bpo BPO
and discounted the ones which don't add a new version stanza to the changelog:
-a Append
-e Edit
-r Release
and discounted the ones which explicitly specify an exact version:
-v Explicit version
-d From dir name
and discounted the one already explicitly excluded from the "ubuntu1" block:
-R Rebuild (-lbuild)
which leaves:
-i Increment
-s Security
-l Local (suffix)
of which -i and -s can and should exhibit "ubuntu1" behaviour and -l never should.
... at which point I prove to myself that you are right and my changes as-is do in fact break the ubuntu-desired behaviour for -s. :-/
So I'll be fixing that, then.
Once I have fixed that, the logical justification proceeds as follows: Since the "ubuntu1" behaviour is desired only in the case of -i and -s, provided every preceding conditional in the long conditional EITHER refers to a mutually exclusive mode option OR explicitly tests for $distributor ne 'Ubuntu', it will be OK to move the "ubuntu1" logic into the !$opt_news block.
- 85. By Max Bowsher on 2010-03-30
-
Fix mistaken removal of Ubuntu-specific versioning from the 'dch -s' case.
- 86. By Max Bowsher on 2010-03-30
-
Remove logically-redundant check.
- 87. By Max Bowsher on 2010-03-30
-
Re-add avoidance of automatic NMU version removal in the distributor=Ubuntu case.
| Max Bowsher (maxb) wrote : | # |
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|
+ 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.


Hi Max,
Thanks for the fix.
I like the idea to make the ubuntu code more targetted, but I'm a little
concerned that doing it in this fashion may break someone's use of it.
Can you convince me that doing this is better than just checking for -l in
the long conditional that is already there?
Thanks,
James