help needed on field ordering
I've updated the stage-build patch for current dpkg 18.104.22.168 and
included Patrick's dpkg-gencontrol patch:
However on testing, whilst this does the desired job of adding
Build-Stage: N if the package was built with DEB_BUILD_OPTIONS=stage=N
it puts it right at the end of the control file after the description,
which looks silly, and dpkg-deb complains about this user-defined field:
dpkg-deb: building package krb5-pkinit' in ../krb5-pkinit_1.10.1+dfsg-1_amd64.deb'.
dpkg-deb: warning: 'debian/libkrb5-3/DEBIAN/control' contains user-defined field 'Build-Stage'
I've just wandered about the dpkg source a bit looking to improve this
but have decided I don't understand it and it'll be much quicker to
ask someone than spend hours trying to work out how it all works.
1) Default ordering:
scripts/Dpkg/Control/Hash.pm has set_output_order()
which only seems to be used in scripts/Dpkg/Control/Control.pm
Hash.pm makes the output order the same as the input order unless
overridden, but that doesn't help me because we are creating this
field anew in dpkg-gencontrol (which seems to mean it defaults to 'the
So I see all this machinery, but I have failed to grok how and where I
specify what the ordering should be, which is something like
'definately before Description', and maybe it's a good idea to put it
somewhere near the top so it's noticed if present. (after
'Architecture', or 'Maintainer'?). How do I express that?
To stop dpkg-deb whinging I presumably need the C half of dpkg to know
that the 'Build-Stage' field exists. It's listed in
scripts/Dpkg/Control/Fields.pm but is there another place fields need
to be listed? I can't find one, and it would seem like a bad plan to
have two lists. So why does dpkg-deb think the field is user-defined?
Any pointers are welcome.
( A better patch to reduce the ridiculous list of static field names
will be along soon, but that's not finished - just close your eyes and
ignore that bit)
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact email@example.com
Archive: 20120628152522.GA13768@stoneboat.aleph1.co.uk">htt p://lists.debian.org/20120628152522.GA13768@stoneboat.aleph1.co.uk
|All times are GMT. The time now is 02:18 AM.|
VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.