Updating python-debian support for build profiles
Stuart Prescott
stuart at debian.org
Sun Aug 31 13:40:14 UTC 2014
Hi!
I've been contemplating deb822's support for build profiles some more and in
particular looked the recent changes to the build profiles / build restrictions
specification. The attached patches are my current thinking on the matter.
The main changes are:
* there now can be multiple sets of < … > restrictions specified for each
package
* as a result, we need to return a list of restrictions not a single
restriction
* I propose flattening the representation of each restriction from (enabled,
(namespace, label)) to (enabled, namespace, label)
* Following John's suggestion, I'm looking to use namedtuples to provide
backwards compatibility for the architecture restrictions while also providing
a nicer syntax for accessors to both arch and build restrictions objects.
As you will see in the patches, that means that
"texlive <!profile.cross>"
becomes
[[(false, 'profile', 'cross')]]
and
'debhelper (>> 5.0.0) <!profile.stage1> <!profile.cross !profile.stage2>'
becomes
[
[(False, 'profile', 'stage1')],
[(False, 'profile', 'stage2'),
(False, 'profile', 'cross')]
]
The innermost tuple is also accessible as a namedtuple (enabled, namespace,
label).
Comments and suggestions welcome!
cheers
Stuart
--
Stuart Prescott http://www.nanonanonano.net/ stuart at nanonanonano.net
Debian Developer http://www.debian.org/ stuart at debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-namedtuple-for-architecture-restrictions.patch
Type: text/x-patch
Size: 2114 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20140831/5a12c031/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Update-build-restrictions-parser-for-new-syntax.patch
Type: text/x-patch
Size: 13397 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20140831/5a12c031/attachment-0001.bin>
More information about the pkg-python-debian-maint
mailing list