summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-04-29 13:40:27 +0800
committerMichal Skalski <mskalski@mirantis.com>2016-07-07 18:21:14 +0200
commita3f9289478e9f9f9706d7166f072d77385e7cecf (patch)
tree1aa9ce0f73b0ef9bebdce01de8a7c885a9c7b6aa
parent7fa4f82edb7128cfcad9d1e8061ed4ccc6949b50 (diff)
Support multi versions of package in fuel plugin
Some plugins may have repeating packages, which are currently filtered by dpkg-scanpackages. This is the case for multiarch builds of some Fuel plugins like ODL, which build and ship both amd64 and arm64 DEBs for ODL prereqs. Allow multiple versions of a single package, by passing the `-m` flag to dpkg-scanpackages when building local Ubuntu repo. Closes-Bug: #1599896 Change-Id: Iba6442d2f21b252769ae30b2af01bbb04e16fd4c Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Notes
Notes (review): Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+1: Ilya Kutukov <ikutukov@mirantis.com> Code-Review+1: Alexandru Avadanii <alexandru.avadanii@enea.com> Code-Review+2: Igor Kalnitsky <ikalnitsky@mirantis.com> Code-Review+1: Andrew Woodward <xarses@gmail.com> Code-Review+1: Andriy Popovych <apopovych@mirantis.com> Workflow+1: Igor Kalnitsky <ikalnitsky@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 31 Aug 2016 13:14:35 +0000 Reviewed-on: https://review.openstack.org/311031 Project: openstack/fuel-plugins Branch: refs/heads/master
-rw-r--r--fuel_plugin_builder/actions/build.py4
-rw-r--r--fuel_plugin_builder/tests/test_build.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/fuel_plugin_builder/actions/build.py b/fuel_plugin_builder/actions/build.py
index 99ccc19..3b25578 100644
--- a/fuel_plugin_builder/actions/build.py
+++ b/fuel_plugin_builder/actions/build.py
@@ -103,7 +103,7 @@ class BaseBuildPlugin(BaseAction):
103 def build_ubuntu_repos(cls, releases_paths): 103 def build_ubuntu_repos(cls, releases_paths):
104 for repo_path in releases_paths: 104 for repo_path in releases_paths:
105 utils.exec_piped_cmds( 105 utils.exec_piped_cmds(
106 ['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'], 106 ['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
107 cwd=repo_path) 107 cwd=repo_path)
108 108
109 @classmethod 109 @classmethod
@@ -227,7 +227,7 @@ class BuildPluginV2(BaseBuildPlugin):
227 def build_ubuntu_repos(self, releases_paths): 227 def build_ubuntu_repos(self, releases_paths):
228 for repo_path in releases_paths: 228 for repo_path in releases_paths:
229 utils.exec_piped_cmds( 229 utils.exec_piped_cmds(
230 ['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'], 230 ['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
231 cwd=repo_path) 231 cwd=repo_path)
232 release_path = join_path(repo_path, 'Release') 232 release_path = join_path(repo_path, 'Release')
233 utils.render_to_file( 233 utils.render_to_file(
diff --git a/fuel_plugin_builder/tests/test_build.py b/fuel_plugin_builder/tests/test_build.py
index 4686478..50a24b3 100644
--- a/fuel_plugin_builder/tests/test_build.py
+++ b/fuel_plugin_builder/tests/test_build.py
@@ -102,7 +102,7 @@ class BaseBuild(BaseTestCase):
102 path = '/repo/path' 102 path = '/repo/path'
103 self.builder.build_ubuntu_repos([path]) 103 self.builder.build_ubuntu_repos([path])
104 utils_mock.exec_piped_cmds.assert_called_once_with( 104 utils_mock.exec_piped_cmds.assert_called_once_with(
105 ['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'], 105 ['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
106 cwd=path) 106 cwd=path)
107 107
108 @mock.patch('fuel_plugin_builder.actions.build.utils') 108 @mock.patch('fuel_plugin_builder.actions.build.utils')
@@ -276,7 +276,7 @@ class TestBaseBuildV2(BaseBuild):
276 path = '/repo/path' 276 path = '/repo/path'
277 self.builder.build_ubuntu_repos([path]) 277 self.builder.build_ubuntu_repos([path])
278 utils_mock.exec_piped_cmds.assert_called_once_with( 278 utils_mock.exec_piped_cmds.assert_called_once_with(
279 ['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'], 279 ['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
280 cwd=path) 280 cwd=path)
281 release_src = os.path.abspath(join_path( 281 release_src = os.path.abspath(join_path(
282 os.path.dirname(__file__), '..', 282 os.path.dirname(__file__), '..',