David James has posted comments on this change.
Change subject: Enable deploy_chrome.py to deploy from a build output directory.
......................................................................
Patch Set 4: I would prefer that you didn't submit this
(13 inline comments)
....................................................
File lib/chrome_util.py
Line 1: #!/usr/bin/python
pylint errors:
************* Module lib.chrome_util
C0322: 24: Operator not preceded by a space
EXTRA_FLAGS=(_HIGHDPI_FLAG,)
^
W0613: 74:Conditions._ExtraFlagSet: Unused argument 'gyp_defines'
W6501:174:_CopyPaths: Specify string format arguments as logging function parameters
W0611: 20: Unused import sudo
W0611: 14: Unused import urlparse
W0611: 9: Unused import optparse
W0611: 13: Unused import time
W0611: 17: Unused import commandline
Line 53: return _NameValueListToDict(shlex.split(defines))
Can we assert upfront that defines is not None? shlex.split 'hangs' (waits on stdin) if defines is None, which is probably not expected here :)
Line 150: ('libnss3.so', '/usr/lib/libnss3.so.1d'),
Shouldn't we use the libdir? On 64 bit, for example, shouldn't it look in lib64? Noticed the ebuild doesn't do that, but it probably should...
Line 156: ('libnspr4.so', '/usr/lib/libnspr4.so.0d'),
This may be copied from the Chrome ebuild, but it looks very fragile... why can't Chrome just look in /usr/lib for so files? Every time someone updates any of these libraries they're going to update this script, and I doubt they're going to be looking in chromite for them...
Line 168: shutil.copytree(src, os.path.join(dest_base,
path.name))
Guessing we'll need permissions on all the files / directories under here...
Line 176: cros_build_lib.Die('%s does not exist. Strict mode enabled.'
I don't see any references to strict mode -- do you mean that it's non-optional ?
Line 182: shutil.copy(f, dest)
Shouldn't we be setting permissions? I think Portage sets executables to 755, and non-executables to 644, but Mike would know for sure.
Line 213: os.chmod(sandbox, 04755)
Since we'll need to set permissions on all installed files, is there any reason the sandbox is special-cased? Might there be a general feature for installing setuid files?
....................................................
File scripts/deploy_chrome.py
Line 330:
logging.info('GYP_DEFINES taken from environment: %s'
W6501:330:_PostParseCheck: Specify string format arguments as logging function parameters
Line 339:
logging.info('Fetching gsutil.')
Should we do this even if gsutil is installed?
Line 360: files.sort()
Why don't we just search for the one that doesn't contain 'unstripped' in it? Simpler and not depending on alphabetical sorting...
Line 361: cros_build_lib.logger.warning('Multiple chrome packages found. Using %s',
What's the reason for using this as opposed to cros_build_lib.Warning
Line 387: pkg_path = _FetchChromePackage(tempdir, options.gs_path)
E0602:387:_PrepareStagingDir: Undefined variable 'tempdir'
--
To view, visit
https://gerrit.chromium.org/gerrit/36020
To unsubscribe, visit
https://gerrit.chromium.org/gerrit/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I25bc3f5afc0fd80fd5e664c75cbd3524b9716831
Gerrit-PatchSet: 4
Gerrit-Project: chromiumos/chromite
Gerrit-Branch: master
Gerrit-Owner: Ryan Cui <
rc...@chromium.org>
Gerrit-Reviewer: Chris Sosa <
so...@chromium.org>
Gerrit-Reviewer: David James <
david...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <
vap...@chromium.org>
Gerrit-Reviewer: Peter Mayo <
pete...@chromium.org>
Gerrit-Reviewer: Ryan Cui <
rc...@chromium.org>