Policy clarified: No need to share a "distribution medium"
Including code built from restricted sources in a distribution medium
does not require sharing the code for building the distribution medium.
Test: m cts dist
Test: m cts dist gts (requires cherry-pick to internal)
Change-Id: I7fcd889b11a97f8deaf4de9d72fdadd09deebe30
diff --git a/tools/compliance/policy_shareprivacyconflicts.go b/tools/compliance/policy_shareprivacyconflicts.go
index 279e179..947bb96 100644
--- a/tools/compliance/policy_shareprivacyconflicts.go
+++ b/tools/compliance/policy_shareprivacyconflicts.go
@@ -49,7 +49,11 @@
// size is the size of the result
size := 0
- for _, cs := range combined {
+ for actsOn, cs := range combined {
+ if actsOn.pure && !actsOn.LicenseConditions().MatchesAnySet(ImpliesShared) {
+ // no need to share code to build "a distribution medium"
+ continue
+ }
size += cs.Intersection(ImpliesShared).Len() * cs.Intersection(ImpliesPrivate).Len()
}
if size == 0 {
@@ -57,6 +61,9 @@
}
result := make([]SourceSharePrivacyConflict, 0, size)
for actsOn, cs := range combined {
+ if actsOn.pure { // no need to share code for "a distribution medium"
+ continue
+ }
pconditions := cs.Intersection(ImpliesPrivate).AsList()
ssconditions := cs.Intersection(ImpliesShared).AsList()