jwinarske / meta-flutter

Yocto meta layer for recipes related to using Google Flutter Engine
MIT License
45 stars 22 forks source link

flutter-engine: vpython leaks out of sysroot #32

Closed xobs closed 2 years ago

xobs commented 3 years ago

vpython appears to use the user's home directory, which causes it to break out of the bitbake sysroot. This could cause clashes between parallel builders, or version issues between different sysroots.

Steps to reproduce

  1. Remove ~/.vpython-root -- sudo rm -rf ~/.vpython-root
  2. Create it as a file: touch ~/.vpython-root
  3. Attempt to build flutter-engine

Results:

ERROR: flutter-engine-git-r0 do_patch: Execution of '/opt/Ion/y/ion-build/tmp/work/cortexa35-poky-linux/flutter-engine/git-r0/temp/run.do_patch.7676' failed with exit code 1:
Python 2.7.17+chromium.22
[E2021-07-16T15:30:52.430598Z 8951 0 annotate.go:273] original error: not a directory

goroutine 1:
#0 go.chromium.org/luci/common/system/filesystem/filesystem.go:37 - filesystem.MakeDirs()
#1 go.chromium.org/luci/vpython/venv/config.go:199 - venv.(*Config).makeEnv()
  reason: could not create environment root: /home/user/.vpython-root

#2 go.chromium.org/luci/vpython/venv/venv.go:150 - venv.With()
  reason: failed to initialize empty probe environment

#3 go.chromium.org/luci/vpython/run.go:62 - vpython.Run()
#4 go.chromium.org/luci/vpython/application/application.go:320 - application.(*application).mainImpl()
#5 go.chromium.org/luci/vpython/application/application.go:408 - application.(*Config).Main.func1()
#6 go.chromium.org/luci/vpython/application/support.go:46 - application.run()
#7 go.chromium.org/luci/vpython/application/application.go:407 - application.(*Config).Main()
#8 vpython/main.go:110 - main.mainImpl()
#9 vpython/main.go:116 - main.main()
#10 runtime/proc.go:225 - runtime.main()
#11 runtime/asm_amd64.s:1371 - runtime.goexit()
WARNING: exit code 1 from a shell command.
jwinarske commented 2 years ago

Not a concern when building in a container. Arguably not a concern building on a standalone host. https://pkg.go.dev/go.chromium.org/luci/vpython#section-readme

Once flutter buildroot and flutter engine are ported to python 3, this will go away.