Hello On Sat, 16 Aug 2025 20:39:28 +0200 Niels Thykier <[email protected]> wrote: > Chiming in on this rather old bug. Based on > https://bugs.debian.org/895570#46, we know that `wrap-and-sort -ast` is > the most popular styling. So in the absence of `cme` not being able to > preserve the original input style, using `-ast` is likely to be a better > default.
Agreed. I understand the effect of the -ast option and can implement them. But I'm still fuzzy on the sort order of the control fields. Anyway, let's tackle first the -ast option. Fixing the field order can be done later. > Secondly, I have introduced an `X-Style: black`[1] to `debian/control` > to enable `debputy` to tell when people have opted into to automatic > reformatting of `debian/*` files. The `black` style is maintained by > `debputy reformat`, so ideally `cme` would use `debputy reformat` for > formatting rather than using its own formatting. But, I appreciate that > would be difficult to retrofit, and if `cme` would default to > `wrap-and-sort -ast` parameters by default it would mostly align with > `X-Style: black`. There are still some minor delta due to field ordering > plus #1111291 and #1111292, but the big win would be `-ast` right now Hmm, right. I'll check if debputy reformat can be run after writing the control file without adding a kludge in cme. > Another alternative is to make `cme` not reformat at all and step out of > this entire discussion. Though, I suspect if this was easy for `cme` to > do then you would have already fixed this bug long ago. Indeed. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849498#10 > Summing up, I hope I can convince you to migrate `cme` to use > `wrap-and-sort -ast` style formatting in the interim in the absence of a > full round-trip formatting-less safe parsing + write cycle. I'm fine with this. All the best

