[PATCH modular 2/3 (v3)] jhbuild: Support skipping packages on a per-architecture basis.

Dan Nicholson dbn.lists at gmail.com
Mon Mar 28 05:31:25 PDT 2011


On Mon, Mar 28, 2011 at 12:04 AM, Dirk Wallenstein <halsmit at t-online.de> wrote:
> On Sun, Mar 27, 2011 at 10:38:44PM -0700, Dan Nicholson wrote:
>> On Sat, Mar 26, 2011 at 7:52 PM, Jeremy Huddleston <jeremyhu at apple.com> wrote:
>> > Reviving this thread...
>> >
>> > I like this idea, but I think we need the logic to be the other way around.  We need to have a mechanism to say that a given module only works on a set of architectures, and skip it if the build arch isn't in that set.
>> >
>> > ie (forgive my python as it's not my native tongue, but I think this gets the point across ;>):
>> >
>> > _arch_specific = {
>> >  'xf86-video-geode': ['i686'], # Intel only
>> > }
>> >
>> > for module, archs in _arch_specific:
>> >    if ! archs.contains(_current_arch):
>> >        skip.extend(module)
>>
>> Oh, that's a nice way to keep the dictionary, but I think you'd still
>> run into the issue where there are multiple platforms to match. In
>> this instance, the arch could be i386, i486, etc. I don't know if a
>> dictionary works well for that. As stated elsewhere in this thread, I
>> think the most straightforward would just be a series of conditionals.
>> This is what I'm using right now:
>>
>> import platform
>> import re
>> _machine = platform.machine()
>> if not re.match("i.86", _machine):
>>        skip.append("xf86-video-geode")
>
> Such a list can be configured and assembled with this code:
> http://x-jhbuild.git.sourceforge.net/git/gitweb.cgi?p=x-jhbuild/x-jhbuild;a=blob;f=lib/depcomp.py;h=5b04a940c0f1836d6fe7032172be257c431c2857;hb=HEAD

That's nice. Thanks, Dirk.

--
Dan


More information about the xorg-devel mailing list