Commit 7d50d738 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Mac PKG: Make sure files show up in the Installer.

Work around an Installer.app bug.

Bug: 1022413
Change-Id: I4eab147d15bcae44f1d0fc6a4e4da9ac78a34772
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904688
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713891}
parent 2721f0b9
...@@ -163,10 +163,15 @@ def _package_and_sign_pkg(paths, dist_config): ...@@ -163,10 +163,15 @@ def _package_and_sign_pkg(paths, dist_config):
# 2. The outer product archive (which is the installable thing that has # 2. The outer product archive (which is the installable thing that has
# pre-install requirements). This is built with `productbuild`. # pre-install requirements). This is built with `productbuild`.
# The component package. ## The component package.
component_pkg_path = os.path.join(paths.work, # The spaces are removed from |dist_config.app_product| for the component
'{}.pkg'.format(dist_config.app_product)) # package path due to a bug in Installer.app that causes the "Show Files"
# window to be blank if there is a space in a component package name.
# https://stackoverflow.com/questions/43031272/
component_pkg_name = '{}.pkg'.format(dist_config.app_product).replace(
' ', '')
component_pkg_path = os.path.join(paths.work, component_pkg_name)
app_path = os.path.join(paths.work, dist_config.app_dir) app_path = os.path.join(paths.work, dist_config.app_dir)
commands.run_command([ commands.run_command([
...@@ -175,7 +180,7 @@ def _package_and_sign_pkg(paths, dist_config): ...@@ -175,7 +180,7 @@ def _package_and_sign_pkg(paths, dist_config):
'/Applications', component_pkg_path '/Applications', component_pkg_path
]) ])
# The product archive. ## The product archive.
# There are two steps here. The first is to create the "distribution file" # There are two steps here. The first is to create the "distribution file"
# which describes the product archive. `productbuild` has a mode to generate # which describes the product archive. `productbuild` has a mode to generate
......
...@@ -314,7 +314,7 @@ class TestPipelineHelpers(unittest.TestCase): ...@@ -314,7 +314,7 @@ class TestPipelineHelpers(unittest.TestCase):
'$W/App Product.req', '$W/App Product.req',
_get_adjacent_item(productbuild_synthesize_args, '--product')) _get_adjacent_item(productbuild_synthesize_args, '--product'))
self.assertEqual( self.assertEqual(
'$W/App Product.pkg', '$W/AppProduct.pkg',
_get_adjacent_item(productbuild_synthesize_args, '--package')) _get_adjacent_item(productbuild_synthesize_args, '--package'))
self.assertEqual( self.assertEqual(
...@@ -401,7 +401,7 @@ class TestPipelineHelpers(unittest.TestCase): ...@@ -401,7 +401,7 @@ class TestPipelineHelpers(unittest.TestCase):
'$W/App Product.req', '$W/App Product.req',
_get_adjacent_item(productbuild_synthesize_args, '--product')) _get_adjacent_item(productbuild_synthesize_args, '--product'))
self.assertEqual( self.assertEqual(
'$W/App Product.pkg', '$W/AppProduct.pkg',
_get_adjacent_item(productbuild_synthesize_args, '--package')) _get_adjacent_item(productbuild_synthesize_args, '--package'))
self.assertEqual( self.assertEqual(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment