Merge lp:~fagerstedt-axel/linaro-android-build-tools/repo-groups-support into lp:linaro-android-build-tools

Proposed by Axel Fagerstedt
Status: Merged
Approved by: Milo Casagrande
Approved revision: 543
Merged at revision: 546
Proposed branch: lp:~fagerstedt-axel/linaro-android-build-tools/repo-groups-support
Merge into: lp:linaro-android-build-tools
Diff against target: 57 lines (+10/-3)
2 files modified
build-scripts/create-user-build-script (+6/-1)
build-scripts/helpers (+4/-2)
To merge this branch: bzr merge lp:~fagerstedt-axel/linaro-android-build-tools/repo-groups-support
Reviewer Review Type Date Requested Status
Milo Casagrande (community) Approve
Review via email: mp+140853@code.launchpad.net

Description of the change

Adds support for specifying REPO_GROUPS in build parameters.

If set the specified will be used in repo inits, and when generating the linaro_android_build_commands.sh script.

This is done as a step towards unifying the linaro android manifests (https://blueprints.launchpad.net/linaro-android/+spec/move-kernel-out-of-android-manifest). A unified manifest may contain several kernels (for instance), we will use repo groups to avoid syncing device specific projects we are not interested in.

To post a comment you must log in.
Revision history for this message
Milo Casagrande (milo) wrote :

Hello,

thanks for working on this!
Overall it looks good to go for me.

One thing:
+ if [ "$REPO_GROUPS" != "all,-notdefault,-eclipse" ]; then

what if the REPO_GROUPS is just "all,-eclipse", the "-g" option is always necessary?
I have no idea how that is handled or what should be the values...

review: Approve
Revision history for this message
Axel Fagerstedt (fagerstedt-axel) wrote :

Hi Milo,

What I was trying to do was to have the scripts behave exactly as they have
always done if repo groups is not defined for the build.
Earlier it would always do < repo init -g "all,-notdefault,-eclipse" > in
the sync operations, but generate a linaro_android_build_commands.sh which
used repo init with no -g option.

A repo init with no -g option specified is actually afaik equivalent to -g
"all,-notdefault". We could generate linaro_android_build_commands.sh with
" -g $REPO_GROUPS " always, I think it would be equally valid, in fact if
the goal is for the generated linaro_android_build_commands.sh to map 100%
to what the server built it would probably be more correct.

Revision history for this message
Milo Casagrande (milo) wrote :

Hello Axel,

apologies for replying so late.
Thanks also for the explanation, it has now been merged.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build-scripts/create-user-build-script'
2--- build-scripts/create-user-build-script 2012-12-17 09:46:00 +0000
3+++ build-scripts/create-user-build-script 2012-12-20 09:55:27 +0000
4@@ -165,13 +165,18 @@
5 else
6 CP_CMD="curl -k ${PINNED_MANIFEST_URL}/pinned-manifest.xml > .repo/manifest.xml"
7 fi
8+ if [ "$REPO_GROUPS" != "all,-notdefault,-eclipse" ]; then
9+ REPO_GROUPS_OPTION="-g $REPO_GROUPS"
10+ else
11+ REPO_GROUPS_OPTION=""
12+ fi
13 cat <<EOF
14 # download the repo tool for android
15 curl "http://android.git.linaro.org/gitweb?p=tools/repo.git;a=blob_plain;f=repo;hb=refs/heads/stable" > repo
16 chmod +x repo
17
18 # download the android code
19-./repo init -u \${MANIFEST_REPO} -b \${MANIFEST_BRANCH} -m \${MANIFEST_FILENAME} ${REPO_MIRROR}
20+./repo init -u \${MANIFEST_REPO} -b \${MANIFEST_BRANCH} -m \${MANIFEST_FILENAME} ${REPO_MIRROR} $REPO_GROUPS_OPTION
21 if [ \${EXACT} -eq 1 ] ; then
22 rm .repo/manifest.xml
23 $CP_CMD
24
25=== modified file 'build-scripts/helpers'
26--- build-scripts/helpers 2012-12-06 15:02:32 +0000
27+++ build-scripts/helpers 2012-12-20 09:55:27 +0000
28@@ -6,6 +6,7 @@
29 MANIFEST_REPO="${MANIFEST_REPO-git://android.git.kernel.org/platform/manifest.git}"
30 MANIFEST_BRANCH="${MANIFEST_BRANCH-master}"
31 MANIFEST_FILENAME="${MANIFEST_FILENAME-default.xml}"
32+ REPO_GROUPS=${REPO_GROUPS-"all,-notdefault,-eclipse"}
33 if [ -n "$REPO_QUIET" ]; then
34 REPO_QUIET="--quiet"
35 fi
36@@ -19,11 +20,12 @@
37 #SYNC_JOBS=${SYNC_JOBS-3}
38 SYNC_JOBS=3
39 fi
40+
41 }
42
43 repo-sync-from-mirror () {
44 setup-repo-vars
45- repo init $REPO_QUIET -u "${MANIFEST_REPO}" -b "${MANIFEST_BRANCH}" -m "${MANIFEST_FILENAME}" $REPO_MIRROR -g all,-notdefault,-eclipse
46+ repo init $REPO_QUIET -u "${MANIFEST_REPO}" -b "${MANIFEST_BRANCH}" -m "${MANIFEST_FILENAME}" $REPO_MIRROR -g $REPO_GROUPS
47 # Save input manifest as build artifact for reference
48 mkdir -p out
49 cp .repo/manifest.xml out/source-manifest.xml
50@@ -57,7 +59,7 @@
51 # fi
52
53 repo init $REPO_QUIET -u "${MANIFEST_REPO}" -b "${MANIFEST_BRANCH}" -m "${MANIFEST_FILENAME}" \
54- $REPO_MIRROR --reference=$PWD/$seed_name -g all,-notdefault,-eclipse
55+ $REPO_MIRROR --reference=$PWD/$seed_name -g $REPO_GROUPS
56 mkdir -p out
57 cp .repo/manifest.xml out/source-manifest.xml
58

Subscribers

People subscribed via source and target branches