We have a lot recipes use the PACKAGECONFIG, we need a way to list them so that we can know which recipe will be affected when we add or remove a recipe(or feature) from the image, e.g.: In cairo.inc: PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ ${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}" PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb" and pulseaudio.inc: PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ ${@base_contains('DISTRO_FEATURES', 'x11', 'gtk x11', '', d)}" PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,bluez4 sbc" PACKAGECONFIG[gtk] = "--enable-gtk2,--disable-gtk2,gtk+" PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd" PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb" The flags are x11 and directfb, the way should list a list: cairo: x11 directfb ... pulseaudio: bluez gtk systemd x11
Usage: list-packageconfig-flag.py [OPTION] [METADIR]... list recipes which have PACKAGECONFIG's flags in METADIR OPTION: -h, --help display this help and exit -f, --flag list PACKAGECONFIG's flags and all affected recipes in METADIR EXAMPLE: list-packageconfig-flag.py poky/meta poky/meta-yocto RECIPE NAME PACKAGECONFIG's flag ========================================= libarchive_2.8.5.bb acl xattr largefile zlib bz2 xz openssl libxml2 expat strace_4.8.bb libaio acl connman.inc wifi bluetooth 3g tist openvpn vpnc l2tp pptp wispr list-packageconfig-flag.py -f poky/meta poky/meta-yocto PACKAGECONFIG's flag RECIPE NAME ==================================== speex gstreamer1.0-plugins-good.inc keyutils rpm_5.4.9.bb gallium-egl mesa.inc
Reference Paul's bitbake parser examples, I think we could do more and better, so redesign the script. Usage: list-packageconfig-flags.py [OPTION] list all available package names which have PACKAGECONFIG flags OPTION: -h, --help display this help and exit -p, --prefer list package names with preferred version -f, --flag list available PACKAGECONFIG flags and all affected packages EXAMPLE: list-packageconfig-flags.py PACKAGE NAME PACKAGECONFIG flags ======================================================================= connman-1.16 wifi bluetooth 3g tist openvpn vpnc l2tp pptp wispr subversion-1.7.10 sasl subversion-1.6.15 sasl subversion-native-1.7.10 sasl subversion-native-1.6.15 sasl list-packageconfig-flags.py -p PACKAGE NAME PACKAGECONFIG flags ======================================================================= connman-1.16 wifi bluetooth 3g tist openvpn vpnc l2tp pptp wispr subversion-1.7.10 sasl subversion-native-1.7.10 sasl list-packageconfig-flags.py -f PACKAGECONFIG flags PACKAGE NAME ========================================= largefile nativesdk-libarchive-2.8.5 libarchive-2.8.5 speex gstreamer1.0-plugins-good-1.0.7 gstreamer1.0-plugins-good-git gallium-egl mesa-9.1.5 mesa-9.1.3+gitAUTOINC+5a925cc550 keyutils rpm-5.4.9 rpm-native-5.4.9 list-packageconfig-flags.py -f -p PACKAGECONFIG flags PACKAGE NAME ==================================== largefile nativesdk-libarchive-2.8.5 libarchive-2.8.5 speex gstreamer1.0-plugins-good-1.0.7 gallium-egl mesa-9.1.5 keyutils rpm-5.4.9 rpm-native-5.4.9
Merged into master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2ff22490aa65df2fe895f3ea3b0c3e7e674243da Test Case: Enter the build directory and setup OE Build Environment list-packageconfig-flags.py PACKAGE NAME PACKAGECONFIG FLAGS ============================================================== alsa-tools-1.0.26.1 defaultval gtk+ avahi-ui-0.6.31 defaultval python bluez4-4.101 alsa defaultval pie list-packageconfig-flags.py -f PACKAGECONFIG FLAG PACKAGE NAMES ==================================== 3g connman-1.16 avahi cups-1.6.3 pulseaudio-4.0 beecrypt rpm-5.4.9 rpm-native-5.4.9 list-packageconfig-flags.py -a ================================================== gtk+-2.24.18 /home/jiahongxu/yocto/poky/meta/recipes-gnome/gtk+/gtk+_2.24.18.bb PACKAGECONFIG x11 PACKAGECONFIG[x11] --with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS} xf86-video-intel-2.21.9 /home/jiahongxu/yocto/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.21.9.bb PACKAGECONFIG None PACKAGECONFIG[xvmc] --enable-xvmc,--disable-xvmc,libxvmc PACKAGECONFIG[sna] --enable-sna,--disable-sna //Hongxu
Verified with 1.5 M4 RC3. poky: master/ed3ef0823fde89371a473d20c0127c0bd16d062b