瀏覽代碼

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>
tags/4.2.0
Guo Ruijing 3 年之前
父節點
當前提交
a3f9289478
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 2
    2
      fuel_plugin_builder/actions/build.py
  2. 2
    2
      fuel_plugin_builder/tests/test_build.py

+ 2
- 2
fuel_plugin_builder/actions/build.py 查看文件

@@ -103,7 +103,7 @@ class BaseBuildPlugin(BaseAction):
def build_ubuntu_repos(cls, releases_paths):
for repo_path in releases_paths:
utils.exec_piped_cmds(
['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'],
['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
cwd=repo_path)

@classmethod
@@ -227,7 +227,7 @@ class BuildPluginV2(BaseBuildPlugin):
def build_ubuntu_repos(self, releases_paths):
for repo_path in releases_paths:
utils.exec_piped_cmds(
['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'],
['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
cwd=repo_path)
release_path = join_path(repo_path, 'Release')
utils.render_to_file(

+ 2
- 2
fuel_plugin_builder/tests/test_build.py 查看文件

@@ -102,7 +102,7 @@ class BaseBuild(BaseTestCase):
path = '/repo/path'
self.builder.build_ubuntu_repos([path])
utils_mock.exec_piped_cmds.assert_called_once_with(
['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'],
['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
cwd=path)

@mock.patch('fuel_plugin_builder.actions.build.utils')
@@ -276,7 +276,7 @@ class TestBaseBuildV2(BaseBuild):
path = '/repo/path'
self.builder.build_ubuntu_repos([path])
utils_mock.exec_piped_cmds.assert_called_once_with(
['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'],
['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
cwd=path)
release_src = os.path.abspath(join_path(
os.path.dirname(__file__), '..',

Loading…
取消
儲存