Run postinst during rootfs generation
Background
In poky we have 2 types of postinst scripts: one (type-1) can be (and has already been) run at rootfs generation time and the other (type-2) has to be delayed to the first-boot of target device. Type-2 makes target device's first-boot slow and it would be great if we can fix it and convert it to type-1.
Tasks
- We can instrument a first-boot with minimal/sato first to see which postinstalls take the most time and then prioritise those ones to fix.
- Dexuan has figurerd out a list of 33 recipes in total(recipes with the same name but with different versions are counted once) we possibly need to fix. For the recipes, we need try to find recipe-specific ways(use appropriately modified native utilities to generate caches, files, etc as necessary on the target filesystem).
- RP: how long were these different groups of postinstall taking on the target device?
- Wolfgang Hauser
Beside the discussed changes, the postinst scripts should be executed in the dependency order. At the time, the scripts are executed in alphabetic order, which breaks the image generation if depended packages are not in alphabetic order, e.g. busybox and busybox subpackages (busybox-mdev).
11 recipes: these could be easily fixed since Scott Garman has added the properly-adjusted utilities "adduser, addgroup, pwconv, etc". The owners of the recipes can help to fix them.
meta/recipes-devtools/distcc/distcc_2.18.3.bb meta/recipes-extended/cronie/cronie_1.4.7.bb meta/recipes-extended/at/at_3.1.12.bb:47 meta/recipes-support/hal/hal.inc:45 meta/recipes-core/dbus/dbus.inc:49 meta/recipes-connectivity/openssh/openssh_5.8p2.bb meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb meta/recipes-graphics/x11-common/xserver-nodm-init.bb meta/recipes-multimedia/pulseaudio/pulseaudio.inc:87 meta/recipes-extended/shadow/shadow_4.1.4.3.bb:125 meta/classes/libc-package.bbclass
6 recipes: these should be easily fixed since the scripts are not related to special native utilites.
mete/recipes-extended/sudo/sudo.inc mete/recipes-extended/sysklogd/sysklogd.inc meta/classes/update-rc.d.bbclass mete/recipes-connectivity/ppp/ppp_2.4.5.bb mete/recipes-graphics/pango/pango.inc mete/recipes-gnome/gtk+/gtk+.inc
4 recipes: we may need to add gtk-update-icon-cache-native.
meta/classes/gtk-icon-cache.bbclass mete/recipes-gnome/librsvg/librsvg_2.32.1.bb mete/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.22.1.bb mete/recipes-sato/sato-icon-theme/sato-icon-theme.inc
3 recipes: need to add gconftool-2-native?
meta/classes/gconf.bbclass mete/recipes-graphics/mutter/mutter.inc mete/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
3 recipes: "dpkg --configure, opkg-cl configure": looks it's possible to fix them if we specify proper parematers?
mete/recipes-devtools/dpkg/dpkg.inc mete/recipes-devtools/opkg/opkg_svn.bb mete/recipes-devtools/opkg/opkg_0.1.8.bb
1 recipe: prelink: Mark Hatle alreay fixed this: http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=d18aba9c1cb5b2cf77cfb2dff150e9003b2e63ef.
mete/recipes-devtools/prelink/prelink_git.bb
1 recipe: "/etc/init.d/populate-volatile.sh update ; DBUSPID=`pidof dbus-daemon`": We can't fix this one.
mete/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc
The below 4 recipes need the related utilities and need more investigation.
1 recipe: update-modules
mete/recipes-kernel/update-modules/update-modules_1.0.bb
1 recipe: systemctl
mete/recipes-connectivity/avahi/avahi.inc
1 recipe: fc-cache
mete/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb:37
1 recipe: gtk-query-immodules-2.0
mete/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb