chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.34k stars 467 forks source link

automate-git.py fails when switching third-party git checkouts #1348

Closed magreenblatt closed 10 years ago

magreenblatt commented 10 years ago

Original report by me.


Original issue 1348 created by magreenblatt on 2014-08-06T14:23:39.000Z:

What steps will reproduce the problem?
Run `python automate-git.py --download-dir =/Users/marshall/code/chromium_git/ --force-clean --branch=1916` where /Users/marshall/code/chromium_git/ is an existing Chromium git checkout.

What is the expected output? What do you see instead?
The checkout/build should succeed. Instead, get the following error:

-------- Running "gclient sync --reset --with_branch_heads --jobs 16" in "/Users/marshall/code/chromium_git/chromium"...

Syncing projects: 78% (68/87) src/third_party/ffmpeg

src/third_party/skia/include (ERROR)


[0:00:02] Started.

[0:00:03] running 'git reset --hard HEAD' in '/Users/marshall/code/chromium_git/chromium/src/third_party/skia/include'

[0:00:03] HEAD is now at 9a62416 (bb) Sanitizing source files in Housekeeper-Nightly


Error: Command git checkout --quiet 269c9659ae396e01a9d95768c99ee527cc65226d (bb) returned non-zero exit status 1 in /Users/marshall/code/chromium_git/chromium/src/third_party/skia/include

error: The following untracked working tree files would be overwritten by checkout:

effects/SkMatrixImageFilter.h

Please move or remove them before you can switch branches.

Aborting

Please use labels and text to provide additional information.
This particular error occurred on OS X 10.9.2 but similar errors have been observed on Windows and Linux. They happen most often when switching the git checkout from one Chromium release branch to another. The `git reset --hard` command executed by gclient is not sufficient to resolve these conflicts. Some potential solutions include:

  1. Modify gclient to run `git clean -dxf` for each third-party git checkout.
  2. Modify automate-git.py to explicitly delete third-party git checkouts, perhaps using a new command-line flag.

This could potentially replace or augment the existing `gclient revert --nohooks` command which doesn't always behave as desired.

The particular skia error described above can be resolved manually with the following commands:

$ cd chromium
$ rm -rf src/third_party/skia
$ gclient sync --reset --with_branch_heads --jobs 16

magreenblatt commented 10 years ago

Comment 1. originally posted by magreenblatt on 2014-08-06T14:37:07.000Z:

The `git clean -dffx` command (use `f` _twice_) can be used to remove untracked directories that are themselves git repositories (like Chromium's third-party checkouts). For example:

$ pwd
/Users/marshall/code/chromium_git/chromium/src

$ git clean -dffxn
Would remove breakpad/src/
Would remove build/dir_exists.pyc
Would remove build/gyp_helper.pyc
Would remove build/landmine_utils.pyc
Would remove build/util/LASTCHANGE
Would remove build/util/LASTCHANGE.blink
Would remove build/vs_toolchain.pyc
Would remove buildtools/
Would remove chrome/browser/resources/pdf/html_office/
Would remove chrome/installer/mac/third_party/xz/xz/
Would remove chrome/test/data/extensions/api_test/permissions/nacl_enabled/bin/
Would remove chrome/test/data/perf/canvas_bench/
Would remove chrome/test/data/perf/frame_rate/content/
Would remove chrome/test/data/perf/third_party/
Would remove chrome/tools/test/reference_build/
Would remove media/cdm/ppapi/api/
Would remove mojo/public/tools/
Would remove native_client/
Would remove out/
Would remove ppapi/generators/idl_ast.pyc
Would remove ppapi/generators/idl_lexer.pyc
Would remove ppapi/generators/idl_lint.pyc
Would remove ppapi/generators/idl_log.pyc
Would remove ppapi/generators/idl_namespace.pyc
Would remove ppapi/generators/idl_node.pyc
Would remove ppapi/generators/idl_option.pyc
Would remove ppapi/generators/idl_outfile.pyc
Would remove ppapi/generators/idl_parser.pyc
Would remove ppapi/generators/idl_propertynode.pyc
Would remove ppapi/generators/idl_release.pyc
Would remove ppapi/generators/idl_visitor.pyc
Would remove sdch/open-vcdiff/
Would remove testing/gmock/
Would remove testing/gtest/
Would remove third_party/WebKit/
Would remove third_party/angle/
Would remove third_party/bidichecker/
Would remove third_party/brotli/src/
Would remove third_party/cacheinvalidation/src/
Would remove third_party/clang_format/bin/mac/clang-format
Would remove third_party/clang_format/script/
Would remove third_party/cld_2/src/
Would remove third_party/colorama/
Would remove third_party/ffmpeg/
Would remove third_party/flac/
Would remove third_party/google_toolbox_for_mac/src/
Would remove third_party/hunspell/
Would remove third_party/hunspell_dictionaries/
Would remove third_party/icu/
Would remove third_party/jinja2/__init__.pyc
Would remove third_party/jinja2/_compat.pyc
Would remove third_party/jinja2/bccache.pyc
Would remove third_party/jinja2/compiler.pyc
Would remove third_party/jinja2/defaults.pyc
Would remove third_party/jinja2/environment.pyc
Would remove third_party/jinja2/exceptions.pyc
Would remove third_party/jinja2/filters.pyc
Would remove third_party/jinja2/lexer.pyc
Would remove third_party/jinja2/loaders.pyc
Would remove third_party/jinja2/nodes.pyc
Would remove third_party/jinja2/optimizer.pyc
Would remove third_party/jinja2/parser.pyc
Would remove third_party/jinja2/runtime.pyc
Would remove third_party/jinja2/tests.pyc
Would remove third_party/jinja2/utils.pyc
Would remove third_party/jinja2/visitor.pyc
Would remove third_party/jsoncpp/source/
Would remove third_party/leveldatabase/src/
Would remove third_party/libaddressinput/src/
Would remove third_party/libc++/trunk/
Would remove third_party/libc++abi/trunk/
Would remove third_party/libexif/sources/
Would remove third_party/libjingle/source/
Would remove third_party/libjpeg_turbo/
Would remove third_party/libphonenumber/src/phonenumbers/
Would remove third_party/libphonenumber/src/resources/
Would remove third_party/libphonenumber/src/test/
Would remove third_party/libsrtp/
Would remove third_party/libvpx/
Would remove third_party/libwebm/source/
Would remove third_party/libyuv/
Would remove third_party/lighttpd/
Would remove third_party/llvm-build/
Would remove third_party/llvm/
Would remove third_party/markupsafe/__init__.pyc
Would remove third_party/markupsafe/_compat.pyc
Would remove third_party/markupsafe/_native.pyc
Would remove third_party/mesa/src/
Would remove third_party/nss/
Would remove third_party/openmax_dl/
Would remove third_party/openssl/
Would remove third_party/opus/src/
Would remove third_party/ots/
Would remove third_party/pdfium/
Would remove third_party/pdfsqueeze/
Would remove third_party/ply/__init__.pyc
Would remove third_party/ply/lex.pyc
Would remove third_party/ply/yacc.pyc
Would remove third_party/pyftpdlib/src/
Would remove third_party/pywebsocket/src/
Would remove third_party/safe_browsing/testing/
Would remove third_party/scons-2.0.1/
Would remove third_party/sfntly/cpp/
Would remove third_party/skia/gyp/
Would remove third_party/skia/include/
Would remove third_party/skia/src/
Would remove third_party/smhasher/src/
Would remove third_party/snappy/src/
Would remove third_party/speex/
Would remove third_party/swig/Lib/
Would remove third_party/swig/mac/
Would remove third_party/trace-viewer/
Would remove third_party/usrsctp/usrsctplib/
Would remove third_party/webdriver/pylib/
Would remove third_party/webgl/src/
Would remove third_party/webpagereplay/
Would remove third_party/webrtc/
Would remove third_party/yasm/source/patched-yasm/
Would remove tools/deps2git/
Would remove tools/gn/bin/mac/gn
Would remove tools/grit/
Would remove tools/gyp/
Would remove tools/idl_parser/__init__.pyc
Would remove tools/idl_parser/idl_lexer.pyc
Would remove tools/idl_parser/idl_node.pyc
Would remove tools/idl_parser/idl_parser.pyc
Would remove tools/json_comment_eater/json_comment_eater.pyc
Would remove tools/json_schema_compiler/cc_generator.pyc
Would remove tools/json_schema_compiler/code.pyc
Would remove tools/json_schema_compiler/cpp_bundle_generator.pyc
Would remove tools/json_schema_compiler/cpp_generator.pyc
Would remove tools/json_schema_compiler/cpp_type_generator.pyc
Would remove tools/json_schema_compiler/cpp_util.pyc
Would remove tools/json_schema_compiler/dart_generator.pyc
Would remove tools/json_schema_compiler/h_generator.pyc
Would remove tools/json_schema_compiler/idl_schema.pyc
Would remove tools/json_schema_compiler/json_parse.pyc
Would remove tools/json_schema_compiler/json_schema.pyc
Would remove tools/json_schema_compiler/memoize.pyc
Would remove tools/json_schema_compiler/model.pyc
Would remove tools/json_schema_compiler/ppapi_generator.pyc
Would remove tools/json_schema_compiler/schema_loader.pyc
Would remove tools/json_schema_compiler/schema_util.pyc
Would remove tools/json_schema_compiler/util_cc_helper.pyc
Would remove tools/json_to_struct/element_generator.pyc
Would remove tools/json_to_struct/struct_generator.pyc
Would remove tools/page_cycler/acid3/
Would remove tools/swarming_client/
Would remove v8/
Would remove xcodebuild/

$ git clean -dfxn
Would skip repository breakpad/src/
Would remove build/dir_exists.pyc
Would remove build/gyp_helper.pyc
Would remove build/landmine_utils.pyc
Would remove build/util/LASTCHANGE
Would remove build/util/LASTCHANGE.blink
Would remove build/vs_toolchain.pyc
Would skip repository buildtools/
Would skip repository chrome/browser/resources/pdf/html_office/
Would skip repository chrome/installer/mac/third_party/xz/xz/
Would skip repository chrome/test/data/extensions/api_test/permissions/nacl_enabled/bin/
Would skip repository chrome/test/data/perf/canvas_bench/
Would skip repository chrome/test/data/perf/frame_rate/content/
Would skip repository chrome/test/data/perf/third_party/octane
Would skip repository chrome/tools/test/reference_build/chrome_mac
Would skip repository media/cdm/ppapi/api/
Would remove mojo/public/tools/
Would skip repository native_client/
Would remove out/
Would remove ppapi/generators/idl_ast.pyc
Would remove ppapi/generators/idl_lexer.pyc
Would remove ppapi/generators/idl_lint.pyc
Would remove ppapi/generators/idl_log.pyc
Would remove ppapi/generators/idl_namespace.pyc
Would remove ppapi/generators/idl_node.pyc
Would remove ppapi/generators/idl_option.pyc
Would remove ppapi/generators/idl_outfile.pyc
Would remove ppapi/generators/idl_parser.pyc
Would remove ppapi/generators/idl_propertynode.pyc
Would remove ppapi/generators/idl_release.pyc
Would remove ppapi/generators/idl_visitor.pyc
Would skip repository sdch/open-vcdiff/
Would skip repository testing/gmock/
Would skip repository testing/gtest/
Would skip repository third_party/WebKit/
Would skip repository third_party/angle/
Would skip repository third_party/bidichecker/
Would skip repository third_party/brotli/src/
Would skip repository third_party/cacheinvalidation/src/
Would remove third_party/clang_format/bin/mac/clang-format
Would skip repository third_party/clang_format/script/
Would skip repository third_party/cld_2/src/
Would skip repository third_party/colorama/src
Would skip repository third_party/ffmpeg/
Would skip repository third_party/flac/
Would skip repository third_party/google_toolbox_for_mac/src/
Would skip repository third_party/hunspell/
Would skip repository third_party/hunspell_dictionaries/
Would skip repository third_party/icu/
Would remove third_party/jinja2/__init__.pyc
Would remove third_party/jinja2/_compat.pyc
Would remove third_party/jinja2/bccache.pyc
Would remove third_party/jinja2/compiler.pyc
Would remove third_party/jinja2/defaults.pyc
Would remove third_party/jinja2/environment.pyc
Would remove third_party/jinja2/exceptions.pyc
Would remove third_party/jinja2/filters.pyc
Would remove third_party/jinja2/lexer.pyc
Would remove third_party/jinja2/loaders.pyc
Would remove third_party/jinja2/nodes.pyc
Would remove third_party/jinja2/optimizer.pyc
Would remove third_party/jinja2/parser.pyc
Would remove third_party/jinja2/runtime.pyc
Would remove third_party/jinja2/tests.pyc
Would remove third_party/jinja2/utils.pyc
Would remove third_party/jinja2/visitor.pyc
Would skip repository third_party/jsoncpp/source/include
Would skip repository third_party/jsoncpp/source/src/lib_json
Would skip repository third_party/leveldatabase/src/
Would skip repository third_party/libaddressinput/src/
Would skip repository third_party/libc++/trunk/
Would skip repository third_party/libc++abi/trunk/
Would skip repository third_party/libexif/sources/
Would skip repository third_party/libjingle/source/talk
Would skip repository third_party/libjpeg_turbo/
Would skip repository third_party/libphonenumber/src/phonenumbers/
Would skip repository third_party/libphonenumber/src/resources/
Would skip repository third_party/libphonenumber/src/test/
Would skip repository third_party/libsrtp/
Would skip repository third_party/libvpx/
Would skip repository third_party/libwebm/source/
Would skip repository third_party/libyuv/
Would skip repository third_party/lighttpd/
Would remove third_party/llvm-build/
Would remove third_party/llvm/
Would remove third_party/markupsafe/__init__.pyc
Would remove third_party/markupsafe/_compat.pyc
Would remove third_party/markupsafe/_native.pyc
Would skip repository third_party/mesa/src/
Would skip repository third_party/nss/
Would skip repository third_party/openmax_dl/
Would skip repository third_party/openssl/
Would skip repository third_party/opus/src/
Would skip repository third_party/ots/
Would skip repository third_party/pdfium/
Would skip repository third_party/pdfsqueeze/
Would remove third_party/ply/__init__.pyc
Would remove third_party/ply/lex.pyc
Would remove third_party/ply/yacc.pyc
Would skip repository third_party/pyftpdlib/src/
Would skip repository third_party/pywebsocket/src/
Would skip repository third_party/safe_browsing/testing/
Would skip repository third_party/scons-2.0.1/
Would skip repository third_party/sfntly/cpp/src
Would skip repository third_party/skia/gyp/
Would skip repository third_party/skia/include/
Would skip repository third_party/skia/src/
Would skip repository third_party/smhasher/src/
Would skip repository third_party/snappy/src/
Would skip repository third_party/speex/
Would skip repository third_party/swig/Lib/
Would skip repository third_party/swig/mac/
Would skip repository third_party/trace-viewer/
Would skip repository third_party/usrsctp/usrsctplib/
Would skip repository third_party/webdriver/pylib/
Would skip repository third_party/webgl/src/
Would skip repository third_party/webpagereplay/
Would skip repository third_party/webrtc/
Would skip repository third_party/yasm/source/patched-yasm/
Would skip repository tools/deps2git/
Would remove tools/gn/bin/mac/gn
Would skip repository tools/grit/
Would skip repository tools/gyp/
Would remove tools/idl_parser/__init__.pyc
Would remove tools/idl_parser/idl_lexer.pyc
Would remove tools/idl_parser/idl_node.pyc
Would remove tools/idl_parser/idl_parser.pyc
Would remove tools/json_comment_eater/json_comment_eater.pyc
Would remove tools/json_schema_compiler/cc_generator.pyc
Would remove tools/json_schema_compiler/code.pyc
Would remove tools/json_schema_compiler/cpp_bundle_generator.pyc
Would remove tools/json_schema_compiler/cpp_generator.pyc
Would remove tools/json_schema_compiler/cpp_type_generator.pyc
Would remove tools/json_schema_compiler/cpp_util.pyc
Would remove tools/json_schema_compiler/dart_generator.pyc
Would remove tools/json_schema_compiler/h_generator.pyc
Would remove tools/json_schema_compiler/idl_schema.pyc
Would remove tools/json_schema_compiler/json_parse.pyc
Would remove tools/json_schema_compiler/json_schema.pyc
Would remove tools/json_schema_compiler/memoize.pyc
Would remove tools/json_schema_compiler/model.pyc
Would remove tools/json_schema_compiler/ppapi_generator.pyc
Would remove tools/json_schema_compiler/schema_loader.pyc
Would remove tools/json_schema_compiler/schema_util.pyc
Would remove tools/json_schema_compiler/util_cc_helper.pyc
Would remove tools/json_to_struct/element_generator.pyc
Would remove tools/json_to_struct/struct_generator.pyc
Would skip repository tools/page_cycler/acid3/
Would skip repository tools/swarming_client/
Would skip repository v8/
Would remove xcodebuild/

magreenblatt commented 10 years ago

Comment 2. originally posted by magreenblatt on 2014-08-07T09:26:30.000Z:

Fixed in trunk revision 1787, 2062 branch revision 1788, 1916 branch revision 1789 and 1750 branch revision 1790.

Add a new `--force-clean-deps` flag to automate-git.py that deletes/re-downloads all third-party git repos using `git clean -dffx`. Should be used in combination with the `--force-clean` flag.

magreenblatt commented 10 years ago