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
This commit is contained in:
Bob Badour
2022-09-21 19:36:59 -07:00
parent 9a76135e44
commit 085a2c23e7
6 changed files with 30 additions and 57 deletions

View File

@@ -49,7 +49,11 @@ func ConflictingSharedPrivateSource(lg *LicenseGraph) []SourceSharePrivacyConfli
// 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 @@ func ConflictingSharedPrivateSource(lg *LicenseGraph) []SourceSharePrivacyConfli
}
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()