From 4f6098f854077362e331e07675dbe44f7ccb85b3 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 23 Jan 2013 22:56:16 +0000 Subject: [PATCH] fix rosmake for non-empty stacks (fix #4068) --- tools/rosmake/src/rosmake/engine.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/rosmake/src/rosmake/engine.py b/tools/rosmake/src/rosmake/engine.py index c65b2516..315a1a99 100755 --- a/tools/rosmake/src/rosmake/engine.py +++ b/tools/rosmake/src/rosmake/engine.py @@ -761,14 +761,15 @@ class RosMakeAll: required_packages = self.specified_packages[:] - # catch dependent packages which are inside of zero sized stacks #3528 + # catch packages of dependent stacks when specified stack is zero-sized #3528 # add them to required list but not the specified list. for s in stacks_arguments: - for d in rosstack.get_depends(s, implicit=False): - try: - required_packages.extend(rosstack.packages_of(d)) - except ResourceNotFound: - self.printer.print_all('WARNING: The stack "%s" was not found. We will assume it is using the new buildsystem and try to continue...' % d) + if not rosstack.packages_of(s): + for d in rosstack.get_depends(s, implicit=False): + try: + required_packages.extend(rosstack.packages_of(d)) + except ResourceNotFound: + self.printer.print_all('WARNING: The stack "%s" was not found. We will assume it is using the new buildsystem and try to continue...' % d) # deduplicate required_packages required_packages = list(set(required_packages))