On Sunday, 8 October 2017 11:50:06 CEST you wrote: > while preparing a mass-commit removal of inactive pkg-perl > members from Uploaders, I found an issue reformatting > debian/control in libmoosex-types-iso8601-perl:
Ack. There's a bug in Dpkg parser. The comments before a Description are not handled correctly. As a result, the comments are misplaced and the short description is moved in the long description. > On the other side, if I run cme remove-uploader script then one > of the comments is moved to the end of the stanza while the other > stays where it was, resulting in comments that make no sense > because they should stick together. That's a side effect of the same bug. > I guess that dealing with comments in deb822 format is difficult > if you reorder the fields, thus I'm wondering if there's a way > to reformat debian/control without altering the ordering, just > reformatting the values. I've tried Augeas [1]. I've created a lens that a read write dpkg file without changing the order. But bridging Augeas with Config::Model [2] is an order of magnitude more complex [2]. One has to maintain 2 dpkg descriptions with: * different syntax (lens description looks like a functional language, Config::Model is a data structure) * subtly different semantics: 2 types of list on Augeas side vs 1 on Config::Model side Long story short, to preserve my sanity, I finally gave up trying to harness these 2 beasts together. I've some ideas on how to improve re-ordering on cme side. Before that, I need to simplify Config::Model read/write classes (aka backends) Thanks for the report All the best [1] http://augeas.net/docs/references/lenses/files/debctrl-aug.html https://github.com/hercules-team/augeas/wiki/Create-a-lens-from-bottom-to-top [2] http://search.cpan.org/dist/Config-Model-Backend-Augeas/lib/Config/Model/ Backend/Augeas.pm -- https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/ http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org