Merge lp:~vishalbhoj/linaro-android-build-tools/license-check into lp:linaro-android-build-tools

Proposed by vishal
Status: Merged
Approved by: Georgy Redkozubov
Approved revision: no longer in the source branch.
Merged at revision: 679
Proposed branch: lp:~vishalbhoj/linaro-android-build-tools/license-check
Merge into: lp:linaro-android-build-tools
Diff against target: 32 lines (+19/-0)
2 files modified
build-scripts/build-android (+4/-0)
build-scripts/license-verification.sh (+15/-0)
To merge this branch: bzr merge lp:~vishalbhoj/linaro-android-build-tools/license-check
Reviewer Review Type Date Requested Status
Georgy Redkozubov Approve
Review via email: mp+189024@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Georgy Redkozubov (gesha) wrote :

For the initial attempt looks good. Some items I would like to address in the future.
1) It's better to have separate MPs for issues not connected with each other. I mean adding LAVA_ADB_CHECK, mapping arndale and checking license are 3 separate issues. At least license check should be in one MP and all other small fixes better to go in another.
2) You have hardcoded groups which is not good in case we decide to add new ones. It might be better to read all requested groups from pinned-manifest.xml and then check against allowed groups from BUILD-INFO.txt.

Revision history for this message
Georgy Redkozubov (gesha) wrote :

Thanks for splitting into separate MPs.
Let's try to address item 2) from last comment, i.e. get rid of hardcoded groups.

Revision history for this message
vishal (vishalbhoj) wrote :

item 2 is also addressed. The groups are not hardcoded.

Revision history for this message
Georgy Redkozubov (gesha) wrote :

Now it looks good. Hope you've tested it on real manifest and build-info.txt

review: Approve
677. By Georgy Redkozubov

[merge] Update repo tool to the latest

678. By Georgy Redkozubov

[merge] map arndale with lamc device

679. By vishal

add license check support

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'build-scripts/build-android'
--- build-scripts/build-android 2013-08-05 10:26:56 +0000
+++ build-scripts/build-android 2013-10-05 08:03:13 +0000
@@ -161,4 +161,8 @@
161 (cd out/; ${BUILD_SCRIPT_ROOT}/create-user-kernel-script)161 (cd out/; ${BUILD_SCRIPT_ROOT}/create-user-kernel-script)
162fi162fi
163163
164if [ ! -n "$SKIP_LICENSE_CHECK" ]; then
165 ${BUILD_SCRIPT_ROOT}/license-verification.sh out/pinned-manifest.xml out/target/product/$TARGET_PRODUCT/BUILD-INFO.txt
166fi
167
164${BUILD_SCRIPT_ROOT}/../utils/manifest-descriptions/make.sh out/source-manifest.xml out/pinned-manifest.xml168${BUILD_SCRIPT_ROOT}/../utils/manifest-descriptions/make.sh out/source-manifest.xml out/pinned-manifest.xml
165169
=== added file 'build-scripts/license-verification.sh'
--- build-scripts/license-verification.sh 1970-01-01 00:00:00 +0000
+++ build-scripts/license-verification.sh 2013-10-05 08:03:13 +0000
@@ -0,0 +1,15 @@
1#! /bin/bash
2
3groups=`grep -rni "ssh:" $1 | sed 's/^.*name="//; s/".*$//'`
4
5for group in $groups
6do
7 if grep -rni "remote=" $1 | grep -Fq $group; then
8 if grep -Fq $group $2; then
9 continue
10 else
11 echo "ERROR: License mismatch between source and artifacts"
12 exit 1
13 fi
14fi
15done

Subscribers

People subscribed via source and target branches