On Mon, 30 Mar 2009, Manoj Srivastava wrote: > On Mon, Mar 30 2009, Nils Rennebarth wrote: > > Usually, unknown fields are iggnored by the debian packaging > > system. To avoid conflicts of user defined fields with field that may > > be used by debian in the future, we suggest to use field names > > starting with X- (so you need to put X[BCS]-X-foo into the control > > file) which are guaranteed to never conflict with future official > > Umm, what? If Debian wants to use some fields, it should not use > fields with X-; since we are the standards maker for the control > file. If you add another X- fied, will we, in a few months, ask people > to add X-X-X- so that Debian may use X-X- in the future? Where does it > stop?
It's not meant for Debian, it's meant for "users" as the title of the section suggest it. Maybe this has no place in policy but it's similar to saying "use /usr/local" for custom apps, here we want to say use "X-" for custom control fields. > > fields. That has the added bonus that dpkg-deb will not issue warnings > > about user defined fields at package build time. > > If a warning about user defined fields in dpkg-deb is not > desirable, should we not instead fix dpkg-deb to only emit such > warnings in verbose mode? Adding another X- to shut off warnings as a > side effect seems a hack. The "X[BSC]-" is stripped by dpkg-gencontrol (and dpkg-source/dpkg-genchanges) so dpkg-deb only see what's after. dpkg-deb should complain by default when it encounters unkwown fields. It could have been a typo. However a field starting with "X-" is not a typo, it's for sure a user-defined field. This is by design for as long as those tools have ever existed. So we don't want multiple level of "X-" in reality. On Mon, 30 Mar 2009, Russ Allbery wrote: > Nils Rennebarth <nils.renneba...@funkwerk-ec.com> writes: > > > Usually, unknown fields are iggnored by the debian packaging system. To > > avoid conflicts of user defined fields with field that may be used by > > debian in the future, we suggest to use field names starting with X- (so > > you need to put X[BCS]-X-foo into the control file) which are guaranteed > > to never conflict with future official fields. > > Is this because the X in front of [BCS] is stripped off when the field is > copied into the resulting binary or source package? Yes. > If so, that seems like a bad design; I wonder if we can just fix that instead. Unknown fields are ignored (and warned) unless you prefix them with some X[BCS] to precise your intent (you indicate that those are unknown fields that you want). Keeping the X- prefix when copying fields would mean we could never invent new fields without forcing a mass rename of fields once they are official. Or we could not add official fields if we use an old dpkg-dev. It might be sub-optimal design, but I'm reluctant to change a behaviour that is in place for 15 years. Cheers, -- Raphaël Hertzog Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny : http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org