summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Haferkamp <rhafer@suse.de>2015-02-27 17:41:29 +0100
committerRalf Haferkamp <rhafer@suse.de>2015-02-27 17:41:29 +0100
commite5e13df52e8b27f79cc70346db594774f0e544cd (patch)
tree6933a46c37ad990a0aef71d846866e77a134212c
parent8817e7bfa43ebcdca4232e5c0505747be38492f5 (diff)
downloadpbr-e5e13df52e8b27f79cc70346db594774f0e544cd.tar.gz
"packages" might list multiple directories
Treat each of the separately when searching for packages in there.. Change-Id: Icb2e2cf2a9cac3d15141aeb8ffad0e38f76cf2e7 Closes-Bug: #1426449
-rw-r--r--pbr/hooks/files.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pbr/hooks/files.py b/pbr/hooks/files.py
index a274014..48bf9e3 100644
--- a/pbr/hooks/files.py
+++ b/pbr/hooks/files.py
@@ -84,9 +84,13 @@ class FilesConfig(base.BaseConfig):
return man_sections
def hook(self):
- package = self.config.get('packages', self.name).strip()
- if os.path.isdir(package):
- self.config['packages'] = find_package.smart_find_packages(package)
+ packages = self.config.get('packages', self.name).strip()
+ expanded = []
+ for pkg in packages.split("\n"):
+ if os.path.isdir(pkg.strip()):
+ expanded.append(find_package.smart_find_packages(pkg.strip()))
+
+ self.config['packages'] = "\n".join(expanded)
self.expand_globs()