Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3243d5e authored by Trevor Radcliffe's avatar Trevor Radcliffe
Browse files

Use relative path instead of base for python proto

We encountered a duplicate sources bug in python proto generation
because we're only using the base name. This CL makes it use the
entire path to avoid this.

Fixes: 295333879
Test: Presubmits
Change-Id: I4ab821508cd5979bd595e327c1ccd3d68110fba6
parent 78e4695b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@ import (
)

func genProto(ctx android.ModuleContext, protoFile android.Path, flags android.ProtoFlags) android.Path {
	srcsZipFile := android.PathForModuleGen(ctx, protoFile.Base()+".srcszip")
	// Using protoFile.Base() would generate duplicate source errors in some cases, so we use Rel() instead
	srcsZipFile := android.PathForModuleGen(ctx, protoFile.Rel()+".srcszip")

	outDir := srcsZipFile.ReplaceExtension(ctx, "tmp")
	depFile := srcsZipFile.ReplaceExtension(ctx, "srcszip.d")