apt-zephyr: Make pre_install_pkgs a function.