Browse Source

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 years ago
parent
commit
a3f9289478
2 changed files with 4 additions and 4 deletions
  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 View File

@@ -103,7 +103,7 @@ class BaseBuildPlugin(BaseAction):
103 103
     def build_ubuntu_repos(cls, releases_paths):
104 104
         for repo_path in releases_paths:
105 105
             utils.exec_piped_cmds(
106
-                ['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'],
106
+                ['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
107 107
                 cwd=repo_path)
108 108
 
109 109
     @classmethod
@@ -227,7 +227,7 @@ class BuildPluginV2(BaseBuildPlugin):
227 227
     def build_ubuntu_repos(self, releases_paths):
228 228
         for repo_path in releases_paths:
229 229
             utils.exec_piped_cmds(
230
-                ['dpkg-scanpackages .', 'gzip -c9 > Packages.gz'],
230
+                ['dpkg-scanpackages -m .', 'gzip -c9 > Packages.gz'],
231 231
                 cwd=repo_path)
232 232
             release_path = join_path(repo_path, 'Release')
233 233
             utils.render_to_file(

+ 2
- 2
fuel_plugin_builder/tests/test_build.py View File

@@ -102,7 +102,7 @@ class BaseBuild(BaseTestCase):
102 102
         path = '/repo/path'
103 103
         self.builder.build_ubuntu_repos([path])
104 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 106
             cwd=path)
107 107
 
108 108
     @mock.patch('fuel_plugin_builder.actions.build.utils')
@@ -276,7 +276,7 @@ class TestBaseBuildV2(BaseBuild):
276 276
         path = '/repo/path'
277 277
         self.builder.build_ubuntu_repos([path])
278 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 280
             cwd=path)
281 281
         release_src = os.path.abspath(join_path(
282 282
             os.path.dirname(__file__), '..',

Loading…
Cancel
Save