CmdActions reference to dependencies, targets and changed dependencies

Bug #434327 reported by schettino72
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
doit
Fix Released
High
Philipp Tölke

Bug Description

An action may now look like this:

"zip %(targets)s %(changed)s"

Related branches

Changed in doit:
assignee: nobody → Philipp Tölke (toelke+lp)
importance: Undecided → High
milestone: none → 0.4
status: New → Confirmed
Revision history for this message
Philipp Tölke (toelke+lp) wrote :

1) add an attribute "task" to Action. this way action has access to
it's task meta information. So on Task constructor we do:

   for action in self.actions:
        action.task = self

2) on Dependency.up_to_date return a list of changed dependencies. an
empty list would mean up-to-date.

3) on runner.py we would save the changed files in the task object:
 task.dep_changed = dependencyManager.up_to_date(task.name,
                                 task.file_dep, task.targets, task.run_once)

4) finally on CmdAction we would build the dict from the task data

 action = self.action % {'targets': " ".join(self.task.targets),
                                  'changed': " ".join(self.task.dep_changed),
                                  'dependencies': " ".join(self.task.dependencies)}

Revision history for this message
schettino72 (schettino72) wrote :

2) on Dependency.up_to_date return a list of changed dependencies. an
empty list would mean up-to-date.

actually just returning a list wont work... a task might not be up-to-date but have no changed dependencies. so return 2 values is_up_to_date, and changed list.

Revision history for this message
Philipp Tölke (toelke+lp) wrote :

My original patch took care of that. I had exactly that bug :-)

Revision history for this message
Philipp Tölke (toelke+lp) wrote :

Please see ~toelke%2Blp/doit/onlychanged-bug/

I think this fixes this bug.

Changed in doit:
status: Confirmed → Fix Committed
Revision history for this message
schettino72 (schettino72) wrote :

thanks. merged on rev 132.

I guess the status "Fix Committed" applies only to trunk. So next time please leave it to me change it to Fix Committed after I merge.

Changed in doit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.