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

Hans-Christoph Steiner hans at at.or.at
Mon Nov 16 13:39:05 UTC 2015


Hey Kai-Chung,

Thanks for your research on this!  It sounds like the profile builds approach
is the way forward.  It is definitely worth putting in work up front if that
lowers the maintenance load.  I am not familiar with Profile Builds, so I
can't really help figure out the details.  But let me know what you need me to
do to make this happen.

.hc

殷啟聰:
> 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
> 



More information about the Android-tools-devel mailing list