예제 #1
0
파일: cook.py 프로젝트: pombreda/rmake
        # some packages depend on environment variables e.g. $QTDIR that
        # are set by other packages.
        setupEnvironment()

        # now override flags set in flavor
        # don't need to reset this flavor ever, because
        # we are in a fork
        flavorutil.setLocalFlags(localFlags)
        packageName = name.split(':')[0]
        # this shouldn't matter for group recipes as it will get overridden
        # by the behavior in cookGroupObject.  But it matters for some other
        # recipe types.  That should be fixed and all that code should be
        # moved inside cookObject so I could get rid of this.
        use.setBuildFlagsFromFlavor(packageName, cfg.buildFlavor, error=False)
        use.resetUsed()
        use.setUsed(usedFlags)

        # we don't want to sign packages here, if necessary, we can sign
        # them at a higher level.
        cfg.signatureKeyMap = {}
        cfg.signatureKey = None
        crossCompile = flavorutil.getCrossCompile(cfg.buildFlavor)

        # add extra buildreqs manually added for this trove
        # by the builder.  Only add them if the recipe is of the
        # right type, and the cfg file we're passed in understands them
        # (it might be a simple conary cfg file).
        if (hasattr(recipeClasses[0], 'buildRequires')
                and hasattr(cfg, 'defaultBuildReqs')):
            for recipeClass in recipeClasses:
                recipeClass.buildRequires += cfg.defaultBuildReqs
예제 #2
0
파일: usetest.py 프로젝트: pombr/conary
 def testTrack(self):
     Use = use.UseCollection()
     Use._addFlag('foo', value=True) 
     Use._addFlag('bar', value=False) 
     Use._addFlag('bam', value=False) 
     assert(Use._getUsed() == [])
     Use._trackUsed(True)
     assert(bool(Use.foo))
     assert(str(Use._getUsed()) == '[foo: True]')
     Use._trackUsed(False)
     bool(Use.bar)
     assert(str(Use._getUsed()) == '[foo: True]')
     Use._resetUsed()
     assert(Use._getUsed() == [])
     Use.foo._set(False)
     Use._trackUsed(True)
     assert(not bool(Use.foo))
     Use._getUsed()
     assert(str(Use._getUsed()) == '[foo: False]')
     Use._trackUsed(False)
     use.setUsed([Use.bar])
     Use._getUsed()
     assert(str(Use._getUsed()) == '[foo: False, bar: False]')
     Use._resetUsed()
     Use._trackUsed(True)
     Use.bar._set()
     assert(bool(Use.bar))
     Use._getUsed()
     assert(str(Use._getUsed()) == '[bar: True]')
     Use._resetUsed()
     Use.bar._set()
     Use.foo._set(False)
     Use._trackUsed(True)
     assert(Use.bar | Use.foo)
     assert(set(x._name for x in Use._iterUsed())  == set(['bar', 'foo']))
     Use._resetUsed()
     Use._trackUsed(True)
     assert(not Use.foo & Use.bar)
     assert(set(x._name for x in Use._iterUsed())  == set(['bar', 'foo']))
     Use._resetUsed()
     Use._trackUsed(True)
     assert(not (Use.foo & Use.bar & Use.bam))
     sorted(x._name for x in Use._iterUsed())
     assert(set(x._name for x in Use._iterUsed()) == \
             set(['bam', 'bar', 'foo']))
     Use._resetUsed()
     Use._trackUsed(True)
     assert(Use.foo | Use.bar | Use.bam)
     assert(set(x._name for x in Use._iterUsed()) == \
             set(['bam', 'bar', 'foo']))
     Use._resetUsed()
     Use._trackUsed(True)
     assert(not (Use.foo == True))
     assert([x._name for x in Use._iterUsed()] == ['foo'])
     Use._resetUsed()
     Use._trackUsed(True)
     assert(True != Use.foo)
     assert([x._name for x in Use._iterUsed()] == ['foo'])
     Arch = use.Arch
     use.resetUsed()
     use.track(True)
     assert(not bool(Arch.ppc.ppc64))
     use.track(False)
     assert(use.getUsed() == [Arch.getCurrentArch()])
예제 #3
0
파일: cook.py 프로젝트: pombreda/rmake
        # some packages depend on environment variables e.g. $QTDIR that 
        # are set by other packages.  
        setupEnvironment()

        # now override flags set in flavor
        # don't need to reset this flavor ever, because
        # we are in a fork
        flavorutil.setLocalFlags(localFlags)
        packageName = name.split(':')[0]
        # this shouldn't matter for group recipes as it will get overridden
        # by the behavior in cookGroupObject.  But it matters for some other
        # recipe types.  That should be fixed and all that code should be
        # moved inside cookObject so I could get rid of this.
        use.setBuildFlagsFromFlavor(packageName, cfg.buildFlavor, error=False)
        use.resetUsed()
        use.setUsed(usedFlags)


        # we don't want to sign packages here, if necessary, we can sign
        # them at a higher level.
        cfg.signatureKeyMap = {}
        cfg.signatureKey = None
        crossCompile = flavorutil.getCrossCompile(cfg.buildFlavor)

        # add extra buildreqs manually added for this trove
        # by the builder.  Only add them if the recipe is of the
        # right type, and the cfg file we're passed in understands them
        # (it might be a simple conary cfg file).
        if (hasattr(recipeClasses[0], 'buildRequires')
            and hasattr(cfg, 'defaultBuildReqs')):
            for recipeClass in recipeClasses:
예제 #4
0
파일: usetest.py 프로젝트: tensor5/conary
 def testTrack(self):
     Use = use.UseCollection()
     Use._addFlag('foo', value=True)
     Use._addFlag('bar', value=False)
     Use._addFlag('bam', value=False)
     assert (Use._getUsed() == [])
     Use._trackUsed(True)
     assert (bool(Use.foo))
     assert (str(Use._getUsed()) == '[foo: True]')
     Use._trackUsed(False)
     bool(Use.bar)
     assert (str(Use._getUsed()) == '[foo: True]')
     Use._resetUsed()
     assert (Use._getUsed() == [])
     Use.foo._set(False)
     Use._trackUsed(True)
     assert (not bool(Use.foo))
     Use._getUsed()
     assert (str(Use._getUsed()) == '[foo: False]')
     Use._trackUsed(False)
     use.setUsed([Use.bar])
     Use._getUsed()
     assert (str(Use._getUsed()) == '[foo: False, bar: False]')
     Use._resetUsed()
     Use._trackUsed(True)
     Use.bar._set()
     assert (bool(Use.bar))
     Use._getUsed()
     assert (str(Use._getUsed()) == '[bar: True]')
     Use._resetUsed()
     Use.bar._set()
     Use.foo._set(False)
     Use._trackUsed(True)
     assert (Use.bar | Use.foo)
     assert (set(x._name for x in Use._iterUsed()) == set(['bar', 'foo']))
     Use._resetUsed()
     Use._trackUsed(True)
     assert (not Use.foo & Use.bar)
     assert (set(x._name for x in Use._iterUsed()) == set(['bar', 'foo']))
     Use._resetUsed()
     Use._trackUsed(True)
     assert (not (Use.foo & Use.bar & Use.bam))
     sorted(x._name for x in Use._iterUsed())
     assert(set(x._name for x in Use._iterUsed()) == \
             set(['bam', 'bar', 'foo']))
     Use._resetUsed()
     Use._trackUsed(True)
     assert (Use.foo | Use.bar | Use.bam)
     assert(set(x._name for x in Use._iterUsed()) == \
             set(['bam', 'bar', 'foo']))
     Use._resetUsed()
     Use._trackUsed(True)
     assert (not (Use.foo == True))
     assert ([x._name for x in Use._iterUsed()] == ['foo'])
     Use._resetUsed()
     Use._trackUsed(True)
     assert (True != Use.foo)
     assert ([x._name for x in Use._iterUsed()] == ['foo'])
     Arch = use.Arch
     use.resetUsed()
     use.track(True)
     assert (not bool(Arch.ppc.ppc64))
     use.track(False)
     assert (use.getUsed() == [Arch.getCurrentArch()])