[Android-tools-devel] Using Profile Builds instead of Merging Repos for Resolving Circular Dependencies among AOSP Packages

殷啟聰 seamlikok at gmail.com
Sat Nov 14 05:32:21 UTC 2015


Hi all,

Currently we have prepared many packages for producing an entire
Android SDK which are hosted on Alioth. The problem is that these ASOP
upstream repositories have complicated dependencies between one
another including several circular dependencies. The attachment is a
graph I made to present you the relationships between these
repositories where the reverse directions of the arrows represent the
dependencies, e.g. at the top, platform/frameworks/base depends on
platform/frameworks/native. We can also see that all repositories
depend on platform/build because all ASOP C/C++ sources must include
AndroidConfig.h in platform/build, and most repositories depend on
platform/system/core because most of them link against liblog.so in
it.

For now the solution is simply merging all repositories with circular
dependencies into one source package. Here are the merged packages:

  * android-platform-system:
    - platform/system/core
    - platform/system/extras
    - platform/libnativehelper
    - platform/build
  * android-platform-frameworks-compile
    - platform/frameworks/compile/libbcc
    - platform/frameworks/compile/slang
    - platform/frameworks/rs

Some days ago pabs reminded me the concept of Profile Builds which is
described in <https://wiki.debian.org/DebianBootstrap>. Using Profile
Builds we can break the circular dependencies without merging them
together. I have made some changes to android-platform-build in the
"profile-builds" branch
<http://anonscm.debian.org/cgit/android-tools/android-platform-build.git/tree/?h=profile-builds>
to use Profile Builds. The key changes are d/rules and d/control.
However if we use Profile Builds the process of uploading to Debian is
a little bit complicated, because buildd currently doesn't support
Profile Builds, the packages on other ports will fail to build. Here
is the estimated process from my understanding:

  1. Build android-platform-system-core,
android-platform-system-extras, android-platform-libnativehelper,
android-platform-build in stage1. In stage1 they are configured to be
able to built independently.
  2. Install the needed packages produced by those 4 source packages in stage1.
  3. Build those 4 source packages without specifying a build profile.
  4. Upload them to FTP Master.
  5. Fire binNMUs for all other ports.

Actually these steps are only needed in the first ever upload. When
some day we are preparing packages for Android 7, all packages should
be installed in all ports by then, we can simply upload them and most
of them can be built automatically.

After all I personally don't like the merging because it's complicated
to reproduce the source tarball and the structure will be a mess. If
we gradually find more circular dependencies in the future, that means
we need to merge more repositories into one packages and it gets
bigger and bigger.

Regards,
Kai-Chung Yan

-- 
/*
* 殷啟聰 | Kai-Chung Yan
* 一生只向真理與妻子低頭
* Full-time student of National Taichung University of Education
* LinkedIn: <https://linkedin.com/in/seamlik>
* Blog: <seamlik.logdown.com>
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repos.png
Type: image/png
Size: 178155 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/android-tools-devel/attachments/20151114/e4ab8021/attachment-0001.png>


More information about the Android-tools-devel mailing list