The same one as with pkgupdate. Also, make the embed list generation generic, so we avoid copy paste.