Ubuntu/Linux Xenial - adding a "sudo apt-get update" (without subsequent apt installs) makes valgrind succeed (and prevents using "sudo: false")


With this diff between bad branch and good branch, I am getting a valgrind success again:

How can I add “sudo: false” without failure?

Since https://changelog.travis-ci.com/the-container-based-build-environment-is-fully-deprecated-84517 , sudo: has no effect.

Regarding the build, diffing the two logs, I see lots of differences in build steps. In particular, there are lots of messages like “SKIPPING shuffled index”, different commands are run in many cases, and in the failed case, an additional library is built – I presume the latter is the source of errors.

Maybe your build interacts with apt’s metadata (e.g. through CMake’s stock logic or Perl libraries) and acts differently depending on what is present in it.

Thanks @native-api! I guess this resolves the issue for me.