New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 734898 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

deploy_chrome fails if --target-dir is specified from the first run

Project Member Reported by satorux@chromium.org, Jun 20 2017

Issue description

What steps will reproduce the problem?
1. cros chrome-sdk --board=<board>
2. build chrome
3. deploy_chrome --to=... --target-dir=<target-dir>

What is the expected result?

deploy_chrome just works as long as <target-dir> is present on the target device.

What happens instead of that?

deploy_chrome fails because it fails to change permissions of /opt/google/chrome/chrome-sandbox, which is on a read-only file system

Please provide any additional information below. Attach a screenshot if
possible.

I wonder why it tries to change permissions of /opt/google/chrome/chrome-sandbox when --target-dir is specified. This seems wrong.

If you run deploy_chrome without --target-dir, it first asks "Remove roots verification? (yes/No)?" and makes the file system writable if you choose yes. Once you do this step, deploy_chrome --target-dir starts working.

Let me take a look.
 
I think now I understand the problem:

  def _Deploy(self):
    ...
      if p.mode:
        # Set mode if necessary.                                                                                
        self.device.RunCommand('chmod %o %s/%s' % (
            p.mode, dest_path, p.src if not p.dest else p.dest)) 

In the last line, dest_path(_CHROME_DIR) is used instead of self.options.target_dir. Let me create a patch

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/4b36f1cd0258fdbc0108f4e9674bd5948e7a3fcf

commit 4b36f1cd0258fdbc0108f4e9674bd5948e7a3fcf
Author: Satoru Takabayashi <satorux@google.com>
Date: Wed Jun 21 04:56:59 2017

deploy_chrome: Fix a bug where --target-dir wasn't honored correctly

Previously, _CHROME_DIR was referenced when changing permissions
of files copied to the target device. This patch fixes this problem
by using self.options.target_dir instead.

BUG= 734898 
TEST=deploy_chrome --target-dir=... works from the first run

Change-Id: I342a5670b832bf626a03c03ed5be81f63ab9e064
Reviewed-on: https://chromium-review.googlesource.com/541000
Commit-Ready: Satoru Takabayashi <satorux@google.com>
Tested-by: Satoru Takabayashi <satorux@google.com>
Reviewed-by: Ryan Cui <rcui@google.com>

[modify] https://crrev.com/4b36f1cd0258fdbc0108f4e9674bd5948e7a3fcf/scripts/deploy_chrome.py

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/4b36f1cd0258fdbc0108f4e9674bd5948e7a3fcf

commit 4b36f1cd0258fdbc0108f4e9674bd5948e7a3fcf
Author: Satoru Takabayashi <satorux@google.com>
Date: Wed Jun 21 04:56:59 2017

deploy_chrome: Fix a bug where --target-dir wasn't honored correctly

Previously, _CHROME_DIR was referenced when changing permissions
of files copied to the target device. This patch fixes this problem
by using self.options.target_dir instead.

BUG= 734898 
TEST=deploy_chrome --target-dir=... works from the first run

Change-Id: I342a5670b832bf626a03c03ed5be81f63ab9e064
Reviewed-on: https://chromium-review.googlesource.com/541000
Commit-Ready: Satoru Takabayashi <satorux@google.com>
Tested-by: Satoru Takabayashi <satorux@google.com>
Reviewed-by: Ryan Cui <rcui@google.com>

[modify] https://crrev.com/4b36f1cd0258fdbc0108f4e9674bd5948e7a3fcf/scripts/deploy_chrome.py

Status: Fixed (was: Assigned)

Comment 5 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment