<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4368</bug_id>
          
          <creation_ts>2013-04-22 06:34:34 +0000</creation_ts>
          <short_desc>Way to list all the PACKAGECONFIG&apos;s flags</short_desc>
          <delta_ts>2013-09-11 06:55:16 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.5 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>hongxu.jia</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ning.zhang</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32426</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-04-22 06:34:34 +0000</bug_when>
    <thetext>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 ??= &quot;${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;x11&apos;, &apos;x11&apos;, &apos;&apos;, d)} \
           ${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;directfb&apos;, &apos;directfb&apos;, &apos;&apos;, d)}&quot;
PACKAGECONFIG[x11] = &quot;--with-x=yes,--without-x,${X11DEPENDS}&quot;
PACKAGECONFIG[directfb] = &quot;--enable-directfb=yes,,directfb&quot;

and pulseaudio.inc:
PACKAGECONFIG ??= &quot;${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;bluetooth&apos;, &apos;bluez&apos;, &apos;&apos;, d)} \
                   ${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;systemd&apos;, &apos;systemd&apos;, &apos;&apos;, d)} \
                   ${@base_contains(&apos;DISTRO_FEATURES&apos;, &apos;x11&apos;, &apos;gtk x11&apos;, &apos;&apos;, d)}&quot;
PACKAGECONFIG[bluez] = &quot;--enable-bluez,--disable-bluez,bluez4 sbc&quot;
PACKAGECONFIG[gtk] = &quot;--enable-gtk2,--disable-gtk2,gtk+&quot;
PACKAGECONFIG[systemd] = &quot;--enable-systemd,--disable-systemd,systemd&quot;
PACKAGECONFIG[x11] = &quot;--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb&quot;


The flags are x11 and directfb, the way should list a list:

cairo: x11 directfb
...
pulseaudio: bluez gtk systemd x11</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35262</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-08-01 11:07:24 +0000</bug_when>
    <thetext>Usage: list-packageconfig-flag.py [OPTION] [METADIR]...
  list recipes which have PACKAGECONFIG&apos;s flags in METADIR

OPTION:
  -h, --help  display this help and exit
  -f, --flag  list PACKAGECONFIG&apos;s flags and all affected recipes in METADIR

EXAMPLE:
list-packageconfig-flag.py poky/meta poky/meta-yocto
RECIPE NAME          PACKAGECONFIG&apos;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&apos;s flag     RECIPE NAME
====================================
speex                    gstreamer1.0-plugins-good.inc
keyutils                 rpm_5.4.9.bb
gallium-egl              mesa.inc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35341</commentid>
    <comment_count>2</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-08-03 08:09:23 +0000</bug_when>
    <thetext>Reference Paul&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35438</commentid>
    <comment_count>3</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-08-07 01:35:27 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36523</commentid>
    <comment_count>4</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-09-11 06:55:16 +0000</bug_when>
    <thetext>Verified with 1.5 M4 RC3.

poky: master/ed3ef0823fde89371a473d20c0127c0bd16d062b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>