Logo Search packages:      
Sourcecode: aap version File versions

def aap-1.090::DoBuild::Update::upd_reason (   self,
  dst_time,
  target 
)

Check if "target" needs to be updated.  "dst_time" is the timestamp
   of the target.

Definition at line 219 of file DoBuild.py.

00219                                           :
        """Check if "target" needs to be updated.  "dst_time" is the timestamp
           of the target."""
        # If a target is older than any source or one of the targets in the
        # dependency doesn't exist: execute the commands.
        if self.forced:
            if Global.cmd_args.options.get("force"):
                reason = _('-F or --force command line argument')
            elif self.source:
                reason = (_('"%s" has force attribute')
                                                   % shorten_name(self.source))
            else:
                reason = (_('target "%s" has force attribute')
                                                         % target.short_name())
        elif (target.attributes.get("virtual")
                and not target.attributes.get("remember")
                and (not self.source or self.source == 'buildcheck')):
            # the buildcheck for a virtual target isn't stored, thus its
            # signature will always be different (new).
            reason = _('virtual target')
        elif self.source:
            if self.newsig:
                reason = _('no old signature for "%s"') % shorten_name(self.source)
            else:
                reason = _('"%s" has changed') % shorten_name(self.source)
        elif dst_time < self.time:
            reason = _('"%s" is newer') % self.time_source
        elif dst_time == 0 and not target.attributes.get("virtual"):
            reason = _("it doesn't exist")
        else:
            reason = ''
        return reason


# List of nodes for for which autodep_dictlist needs to be cleared when a
# target is build.
clear_autodep_list = []


Generated by  Doxygen 1.6.0   Back to index