Hello, For the case of team uploads (and maybe NMU's) where people like to use cme to fix certain issues in debian/control, it would be helpful if calling cme fix would *only* fix issues and not restyle it. If the primary maintainer is not using cme, the uploader would have to either not use cme in this case or take care to commit only the necessary changes, which adds extra work and disrupts the uploader's workflow. It would be great if `cme fix` only fixed and there was another command that would do this in addition to restyling/reorganizing the files. Many thanks for your consideration. regards Afif
I've tried such a way by bridging Config::Model with Augeas [1] [2]. But supporting such a solution is too much work for the benefit. I may reconsider this if I get help hacking on Config::Model. re-ordering imposing by cme. This would minimize the impact of further changes done by cme. Mentioning that cme's style matches the ordering of parameters in Debian policy may help convincing the primary maintainer. All the best [1] http://augeas.net/docs/references/1.4.0/lenses/files/debctrl-aug.html [2] http://search.cpan.org/dist/Config-Model-Backend-Augeas/lib/Config/Model/Backend/Augeas.pm
Hello, على الأربعاء 28 كانون الأول 2016 02:03، كتب Dominique Dumont: I've added the 'help' tag to reflect this. I am one such maintainer. While I can get used to a field ordering different from that used by dh-make, my main problem is the way cme organizes lists-- it removes trailing commas and doesn't use a constant indentation level globally. Trying to maintain this isn't a one-time fight with cme. Thanks and regards Afif
Debian policy documents quite well what syntax is acceptable. Unfortunately, there's no recommendation that help consistency between tools that generate (or re-organize) control files (and other). For instance, wrap-and-sort, dh-make* and cme all use different styles. I would not mind changing cme output style if such a recommendation were adopted I understand your plight. All the best
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. 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 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. 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. Best regards, Niels [1]: More info at https://people.debian.org/~nthykier/blog/2024/debian-packaging-with-style-black.html if interesting.
Hello 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. Hmm, right. I'll check if debputy reformat can be run after writing the control file without adding a kludge in cme. Indeed. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849498#10 I'm fine with this. All the best
FTR, I've updated cme to write lists for dpkg files using the same style as "wrap-and-sort -ast" in this commit: https://salsa.debian.org/perl-team/modules/packages/libconfig-model-dpkg-perl/-/commit/b47f787095a12e708ac572dbfce245b212181ac8 All the best