Opened on 01/16/2018 at 05:50:23 AM

Closed on 01/19/2018 at 06:38:41 AM

#6272 closed defect (fixed)

Can't sync because of changes in android_tools

Reported by: asmirnov Assignee:
Priority: P2 Milestone:
Module: Adblock-Plus-for-Chromium Keywords:
Cc: Blocked By: #6263
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29670562/

Description (last modified by asmirnov)

Environment

libadblockplus-android is compiled when compiling Chromium. Gradle needs according platforms versions and build tools (see https://github.com/adblockplus/libadblockplus-android/blob/master/libadblockplus-android/build.gradle#L4 for example).

Chromium requires build tools and platform version different from libadblockplus-android ones.
So prepare_build_tools.py script is called as hook https://gitlab.com/adblockplus/chromium/blob/abp/DEPS#L1265 to request android sdkmanager to update to require versions of platforms and build-tools. This lead to uncommited changes that are detected by gclient sync at the 2nd and further times:

gclient sync
Syncing projects:  17% (18/104) src/third_party/WebKit/Source/devtools/devtools-Syncing projects:  18% (19/104) src/third_party/chromite                        Syncing projects:  81% (22/27) src/third_party/angle     

src/third_party/android_tools (ERROR)
----------------------------------------
[0:00:01] Started.
----------------------------------------
Error: 13> 
13> ____ src/third_party/android_tools at e9d4018e149d50172ed462a7c21137aa915940ec
13> 	You have unstaged changes.
13> 	Please commit, stash, or reset.

Actually there is workaround - delete libadblockplus and libadblockplus-android files (except ones) and android_tools (or revert android_tools changes). It will force gclient sync to checkout libadblockplus and libadblockplus-android and android_tools and run the hooks again, but it would be great to avoid any manual actions and make the thing just working out-of-box.

How to reproduce

  1. check out the repository
  2. run gclient sync, everything is ok (android_tools are updated)
  3. Chromium can be compiled (just to check everything is synced).
  4. run gclient sync and see the failure above

Observed behaviour

gclient sync failure

Expected behaviour

gclient sync works without any failures and actually performs sync.

Attachments (0)

Change History (7)

comment:1 Changed on 01/16/2018 at 05:53:41 AM by asmirnov

I'm going to duplicate android_tools/sdk in libadblockplus-android/third_party and update build-tools and platforms there.
It will require some storage (few gigabytes) but allows to leave original android_tools unchanged.

I've tried to find the way to ignore the changes in sdk/platforms, sdk/extras, sdk/licenses but .gitignore it overriden by repo one's so i'd prefer to try the simplest solution for now.

comment:2 Changed on 01/16/2018 at 06:12:15 AM by asmirnov

  • Platform changed from Unknown / Cross platform to Android

comment:3 Changed on 01/16/2018 at 06:17:27 AM by asmirnov

  • Description modified (diff)

comment:4 Changed on 01/16/2018 at 07:46:23 AM by asmirnov

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed on 01/16/2018 at 09:08:46 AM by asmirnov

  • Blocking 6273 added

comment:6 Changed on 01/16/2018 at 09:09:01 AM by asmirnov

  • Blocking 6273 removed

comment:7 Changed on 01/19/2018 at 06:38:41 AM by asmirnov

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.