Skip to content

main/postmarketos-mkinitfs: remove cache and improve performance

The lddtree script uses the scanelf utility which has some security check that causes a slowdown of the operation, executing it without privileges it's really faster.

Thanks to the speed improvement we can remove the whole caching mechanism and this solves also the issue of the dependencies not hashed.

Comparison between running lddtree as root or as nobody:
as root: time lddtree -l $BINARIES_EXTRA
as nobody: time su nobody -s /bin/sh -c "lddtree -l $(echo $BINARIES_EXTRA)"

in native chroot:

  • as root: 48s
  • as nobody: 0.8s

in qemu armv7:

  • as root: 1m 12s
  • as nobody: 23s

Closes !1100 (closed)

Merge request reports