rosmake with stack name argument
I wonder if it is intended behavior of the rosmake utility to include all packages in dependent stacks (stack A) in the list of packages to be built when invoked with a stack name (stack B) as argument although these packages are not required to build the packages in stack B.
Example:
stack A
|- package A1
|- package A2
stack B (depends on stack A)
|- package B1 (depends on package A1)
Stack B depends on stack A because package B1 depends on A1. Note that package B1 does not depend on A2.
If you run rosmake for package B1 only, packages B1 and A1 will be built, which is what I would expect:
$ rosmake B1
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are:
['B1']
[ rosmake ] Logging to directory /home/meyer/.ros/rosmake/rosmake_output-20121126-192457
[ rosmake ] Expanded args ['B1'] to:
['B1']
[rosmake-0] Starting >>> A1 [ make ]
[rosmake-0] Finished <<< A1 [PASS] [ 1.80 seconds ]
[rosmake-0] Starting >>> B1 [ make ]
[rosmake-0] Finished <<< B1 [PASS] [ 1.35 seconds ]
[ rosmake ] Results:
[ rosmake ] Built 2 packages with 0 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/meyer/.ros/rosmake/rosmake_output-20121126-192457
But if you run rosmake with the stack B as argument package A2 will also be built:
$ rosmake B
[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['B']
[ rosmake ] Logging to directory /home/meyer/.ros/rosmake/rosmake_output-20121126-192509
[ rosmake ] Expanded args ['B'] to:
['B1']
[rosmake-0] Starting >>> A1 [ make ]
[rosmake-1] Starting >>> A2 [ make ]
[rosmake-0] Finished <<< A1 [PASS] [ 1.00 seconds ]
[rosmake-0] Starting >>> B1 [ make ]
[rosmake-1] Finished <<< A2 [PASS] [ 1.57 seconds ]
[rosmake-0] Finished <<< B1 [PASS] [ 1.01 seconds ]
[ rosmake ] Results:
[ rosmake ] Built 3 packages with 0 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/meyer/.ros/rosmake/rosmake_output-20121126-192509
If stack B does not declare the dependency to stack A in its stack.xml, package A2 will not be built.
The example has been tested with the current ros-fuerte-ros release (1.16.1.2ubuntu7).
To clarify a bit further: The essence of the question is the semantics of rosmake B: Is it a)build all packages in B and all stacks that B depends on (recursively) or b)build all packages in B and all packages that packages in stack B depend on? a) is the current behavior, b) is what I would expect.