• ferringb@google.com's avatar
    Cleanup chromite_wrapper. · 0230d91a
    ferringb@google.com authored
    The original design of this had some issues:
    
    1) forced targets to be importable via 'buildbot.cbuildbot', rather
      than the proper/full 'chromite.buildbot.cbuildbot'.  Scripts worked
      around this, but it's an unwanted limitation.
    
    2) That importation requirement means that within the chroot, we've
      had to export cros_sdk *and* cros_sdk.py in the PATH.  This is
      undesirable clutter, and introduces potential errors as scripts
      localize themselves to cros_sdk.py rather than invoking cros_sdk
      (the consumers should be agnostic to the language the tool is
      written in).
    
    3) chromite_wrapper enforced assumptions about python namespace w/in
      the targets- specifically that 'main' must always be invokable
      without any arguments.  This limits refactoring/cleanup in chromite
      via having to support ancient API assumptions (api's that weren't
      public); modern chromite has repurposed main changing the prototype,
      and using it's own wrapper doing signal handler setup, and general
      framework behaviour.  Longer term, that 'main' functor is unlikely
      to even exist.  The strong coupling chromite_wrapper forced limits
      are refactoring possibilities.
    
    4) In modern chromite, all user consumable tools are now required to
      exist w/in chromite/bin/, and be executable and invokable.  This is
      what we want going forward.
    
    5) Implied we want chromite_wrapper used w/in the chroot; we don't,
      thus drop all CROS_WORKON_SRCROOT awareness.
    
    6) Exposed a chromite_wrapper invokable (that didn't work) into the
      PATH outside the chroot; this is resolved via moving it into a
      support directory and repointing symlinks to it.
    
    At this point, if it's working with a modern chromite checkout the
    script is a simple execv pass thru.  If it isn't, then it will fallback
    to the old import trickery.
    
    This has been tested against R16, R17, R18, ToT, 0.11.241.B, factory-*,
    basically all branches w/in chromite without issue.
    
    
    
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@128555 0039d316-1c4b-4281-b951-d872f2087c98
    0230d91a
Name
Last commit
Last update
bootstrap Loading commit data...
git-utils Loading commit data...
support Loading commit data...
testing_support Loading commit data...
tests Loading commit data...
third_party Loading commit data...
zsh-goodies Loading commit data...
.gitignore Loading commit data...
LICENSE Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README Loading commit data...
README.codereview Loading commit data...
README.gclient Loading commit data...
README.git-cl Loading commit data...
README.testing Loading commit data...
WATCHLISTS Loading commit data...
apply_issue.py Loading commit data...
breakpad.py Loading commit data...
cbuildbot Loading commit data...
checkout.py Loading commit data...
chrome-update-create-task.bat Loading commit data...
chrome-update.bat Loading commit data...
chrome-update.py Loading commit data...
chrome_set_ver Loading commit data...
codereview.settings Loading commit data...
commit_queue.py Loading commit data...
cpplint.bat Loading commit data...
cpplint.py Loading commit data...
cpplint_chromium.py Loading commit data...
create-chromium-git-src Loading commit data...
cros_sdk Loading commit data...
drover Loading commit data...
drover.bat Loading commit data...
drover.py Loading commit data...
fix_encoding.py Loading commit data...
gcl Loading commit data...
gcl.bat Loading commit data...
gcl.py Loading commit data...
gclient Loading commit data...
gclient.bat Loading commit data...
gclient.py Loading commit data...
gclient_scm.py Loading commit data...
gclient_utils.py Loading commit data...
git-cl Loading commit data...
git-cl-upload-hook Loading commit data...
git-gs Loading commit data...
git-try Loading commit data...
git_cl.py Loading commit data...
git_try.py Loading commit data...
hammer Loading commit data...
hammer.bat Loading commit data...
my_reviews.py Loading commit data...
ninja Loading commit data...
ninja-deplist-helper.exe Loading commit data...
ninja-linux64 Loading commit data...
ninja-mac Loading commit data...
ninja.exe Loading commit data...
owners.py Loading commit data...
package_management.py Loading commit data...
patch.py Loading commit data...
presubmit_canned_checks.py Loading commit data...
presubmit_support.py Loading commit data...
profile.xml Loading commit data...
pylintrc Loading commit data...
repo Loading commit data...
rietveld.py Loading commit data...
scm.py Loading commit data...
subprocess2.py Loading commit data...
trychange.py Loading commit data...
update_depot_tools Loading commit data...
watchlists.py Loading commit data...
weekly Loading commit data...
wtf Loading commit data...