summaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
Diffstat (limited to 'apex')
-rw-r--r--apex/builders/common_builder.py4
-rw-r--r--apex/tests/test_apex_common_builder.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/apex/builders/common_builder.py b/apex/builders/common_builder.py
index 101860cd..fd3bcc3d 100644
--- a/apex/builders/common_builder.py
+++ b/apex/builders/common_builder.py
@@ -47,7 +47,7 @@ def add_upstream_patches(patches, image, tmp_dir,
in patch)
:return: None
"""
- virt_ops = list()
+ virt_ops = [{con.VIRT_INSTALL: 'patch'}]
logging.debug("Evaluating upstream patches:\n{}".format(patches))
for patch in patches:
assert isinstance(patch, dict)
@@ -73,7 +73,7 @@ def add_upstream_patches(patches, image, tmp_dir,
image))
else:
logging.info("Ignoring patch:\n{}".format(patch))
- if virt_ops:
+ if len(virt_ops) > 1:
virt_utils.virt_customize(virt_ops, image)
diff --git a/apex/tests/test_apex_common_builder.py b/apex/tests/test_apex_common_builder.py
index d042d2ba..c32f72c9 100644
--- a/apex/tests/test_apex_common_builder.py
+++ b/apex/tests/test_apex_common_builder.py
@@ -58,6 +58,7 @@ class TestCommonBuilder(unittest.TestCase):
patch_file = "{}.patch".format(change_id)
patch_file_path = "/dummytmp/{}".format(patch_file)
test_virt_ops = [
+ {con.VIRT_INSTALL: 'patch'},
{con.VIRT_UPLOAD: "{}:{}".format(patch_file_path,
project_path)},
{con.VIRT_RUN_CMD: "cd {} && patch -p1 < {}".format(