Bug#1101404: libconfig-model-dpkg-perl: Odd reordering of control fields

Dominique Dumont dod at debian.org
Thu Mar 27 10:16:36 GMT 2025


On Thursday, 27 March 2025 02:45:09 Central European Standard Time you wrote:
> I had been seeing an odd order for fields in several packages I've
> been fixing lately and was wondering what had caused those. Today
> after seeing a commit with tool attribution I realized it was
> «cme fix» performing those changes. 

Indeed. The order is imposed by cme. Otherwise, it's quite hard to figure out 
where a new field should added in an existing control file when using "cme edit 
dpkg".

I remember that I followed the order specified in Debian policy when I created 
Dpkg model. But other parameters were added afterwards in a more haphazard 
fashion... Oops.

> The rationale for these changes can be found in:
>  
> https://github.com/Debian/dh-make-golang/commit/9da71c1a77e82ba2c1ab0da1d1e
> 5404cc3688ad1

which makes sense.

> Which reminded me to check what's the order in the dpkg documentation,
> and it does not look to be consistent, so I'll fix that to match, but
> given that dpkg is already frozen, that will probably be queued for
> 1.23.x.

I would love to be able to follow a canonical order of parameters specified 
somewhere, be it in Debian policy or dpkg doc. Then cme would follow that 
order. And we could align other tools like wrap-and-sort.

I'll update the order of control Fields in cme once you've updated dpkg doc. 
Please keep me posted.

Note that I try to avoid changing field order, as this is annoying for users. 
So I hope to be able to change it only once to get cme to write fields in an 
agreed-upon order.

> Similar with debian/copyright field ordering in, as updated in Debian
> Policy:
>  
> https://salsa.debian.org/dbnpolicy/policy/-/commit/f56acc3bb77823a220559a0f
> de7e41d257bd7f7c

This is now fixed in git.

All the best



More information about the pkg-perl-maintainers mailing list