예제 #1
0
    def doProcess(self, recipe):
        """
        Invocation instance
        @param recipe: holds the recipe object, which is used for
        the macro set and group objects.
        @return: None
        @rtype: None
        """
        self.recipe = recipe
        self.macros = recipe.macros

        if hasattr(self.__class__, 'preProcess'):
            self.preProcess()

        # is runtime check implemented?
        if hasattr(self.__class__, 'test'):
            if not self.test():
                return

        # change self.use to be a simple flag
        self.use = action.checkUse(self.use)

        # compile the exceptions
        self.exceptionFilters = []
        self.compileFilters(self.invariantexceptions, self.exceptionFilters)
        if self.exceptions:
            if not isinstance(self.exceptions, (tuple, list)):
                # turn a plain string into a sequence
                self.exceptions = (self.exceptions, )
            self.compileFilters(self.exceptions, self.exceptionFilters,
                                self.unusedFilters['exceptions'])

        # compile the inclusions
        self.inclusionFilters = []
        self.compileFilters(self.invariantinclusions, self.inclusionFilters)
        if not self.inclusions:
            # an empty list, as opposed to None, means nothing is included
            if isinstance(self.inclusions, (tuple, list)):
                return
        else:
            if not isinstance(self.inclusions, (tuple, list)):
                # turn a plain string into a sequence
                self.inclusions = (self.inclusions, )
            self.compileFilters(self.inclusions, self.inclusionFilters,
                                self.unusedFilters['inclusions'])

        # dispatch if/as appropriate
        if self.use:
            self.do()

        if hasattr(self.__class__, 'postProcess'):
            self.postProcess()
예제 #2
0
    def doProcess(self, recipe):
        """
        Invocation instance
        @param recipe: holds the recipe object, which is used for
        the macro set and group objects.
        @return: None
        @rtype: None
        """
        self.recipe = recipe
        self.macros = recipe.macros

        if hasattr(self.__class__, 'preProcess'):
            self.preProcess()

        # is runtime check implemented?
        if hasattr(self.__class__, 'test'):
            if not self.test():
                return

        # change self.use to be a simple flag
        self.use = action.checkUse(self.use)

        # compile the exceptions
        self.exceptionFilters = []
        self.compileFilters(self.invariantexceptions, self.exceptionFilters)
        if self.exceptions:
            if not isinstance(self.exceptions, (tuple, list)):
                # turn a plain string into a sequence
                self.exceptions = (self.exceptions,)
            self.compileFilters(self.exceptions, self.exceptionFilters,
                    self.unusedFilters['exceptions'])

        # compile the inclusions
        self.inclusionFilters = []
        self.compileFilters(self.invariantinclusions, self.inclusionFilters)
        if not self.inclusions:
            # an empty list, as opposed to None, means nothing is included
            if isinstance(self.inclusions, (tuple, list)):
                return
        else:
            if not isinstance(self.inclusions, (tuple, list)):
                # turn a plain string into a sequence
                self.inclusions = (self.inclusions,)
            self.compileFilters(self.inclusions, self.inclusionFilters,
                    self.unusedFilters['inclusions'])

        # dispatch if/as appropriate
        if self.use:
            self.do()

        if hasattr(self.__class__, 'postProcess'):
            self.postProcess()
예제 #3
0
    def doProcess(self, recipe):
        """
        Invocation instance
        @param recipe: holds the recipe object, which is used for
        the macro set and package objects.
        @return: None
        @rtype: None
        """
        self.recipe = recipe
        self.macros = recipe.macros

        if not self._isSupportedTarget():
            return

        if self.rootdir:
            self.rootdir = util.normpath(self.rootdir % self.macros)

        if (hasattr(recipe, '_isDerived') and recipe._isDerived == True
                and self.processUnmodified is None):
            # This policy does not handle derived packages
            return

        if hasattr(self.__class__, 'preProcess'):
            self.preProcess()

        # is runtime check implemented?
        if hasattr(self.__class__, 'test'):
            if not self.test():
                return

        # change self.use to be a simple flag
        self.use = action.checkUse(self.use)

        # compile the exceptions
        self.exceptionFilters = []
        self.compileFilters(self.invariantexceptions, self.exceptionFilters)
        if self.exceptions:
            if not isinstance(self.exceptions, (tuple, list, set)):
                # turn a plain string into a sequence
                self.exceptions = (self.exceptions, )
            self.compileFilters(self.exceptions, self.exceptionFilters,
                                self.unusedFilters['exceptions'])

        # compile the inclusions
        self.inclusionFilters = []
        if self.invariantinclusions is None:
            self.compileFilters([], self.inclusionFilters)
        else:
            self.compileFilters(self.invariantinclusions,
                                self.inclusionFilters)
        if not self.inclusions:
            # an empty list, as opposed to None, means nothing is included
            if isinstance(self.inclusions, (tuple, list, set)):
                return
        else:
            if not isinstance(self.inclusions, (tuple, list, set)):
                # turn a plain string into a sequence
                self.inclusions = (self.inclusions, )
            self.compileFilters(self.inclusions, self.inclusionFilters,
                                self.unusedFilters['inclusions'])

        # dispatch if/as appropriate
        if self.use:
            self.do()

        if hasattr(self.__class__, 'postProcess'):
            self.postProcess()
예제 #4
0
    def doProcess(self, recipe):
        """
        Invocation instance
        @param recipe: holds the recipe object, which is used for
        the macro set and package objects.
        @return: None
        @rtype: None
        """
        self.recipe = recipe
        self.macros = recipe.macros

        if not self._isSupportedTarget():
            return

        if self.rootdir:
            self.rootdir = util.normpath(self.rootdir % self.macros)

        if (hasattr(recipe, '_isDerived')
            and recipe._isDerived == True
            and self.processUnmodified is None):
            # This policy does not handle derived packages
            return

        if hasattr(self.__class__, 'preProcess'):
            self.preProcess()

        # is runtime check implemented?
        if hasattr(self.__class__, 'test'):
            if not self.test():
                return

        # change self.use to be a simple flag
        self.use = action.checkUse(self.use)

        # compile the exceptions
        self.exceptionFilters = []
        self.compileFilters(self.invariantexceptions, self.exceptionFilters)
        if self.exceptions:
            if not isinstance(self.exceptions, (tuple, list, set)):
                # turn a plain string into a sequence
                self.exceptions = (self.exceptions,)
            self.compileFilters(self.exceptions, self.exceptionFilters, self.unusedFilters['exceptions'])

        # compile the inclusions
        self.inclusionFilters = []
        if self.invariantinclusions is None:
            self.compileFilters([], self.inclusionFilters)
        else:
            self.compileFilters(self.invariantinclusions, self.inclusionFilters)
        if not self.inclusions:
            # an empty list, as opposed to None, means nothing is included
            if isinstance(self.inclusions, (tuple, list, set)):
                return
        else:
            if not isinstance(self.inclusions, (tuple, list, set)):
                # turn a plain string into a sequence
                self.inclusions = (self.inclusions,)
            self.compileFilters(self.inclusions, self.inclusionFilters, self.unusedFilters['inclusions'])

        # dispatch if/as appropriate
        if self.use:
            self.do()

        if hasattr(self.__class__, 'postProcess'):
            self.postProcess()