<?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>2521</bug_id>
          
          <creation_ts>2012-05-30 02:59:25 +0000</creation_ts>
          <short_desc>[Hob2] The require of Gtk+, PyGtk and PyGobject is obscure</short_desc>
          <delta_ts>2012-07-16 10:14:00 +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>Hob</product>
          <component>hob</component>
          <version>1.3</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>normal</bug_severity>
          <target_milestone>1.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Dongxiao Xu">dongxiao.xu</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>jiajun.xu</cc>
    
    <cc>kai.kang</cc>
    
    <cc>liang.li2</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>shane.wang</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21716</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-05-30 02:59:25 +0000</bug_when>
    <thetext>When run hob on Ubuntu 10.10:

$ hob
FATAL: Gtk+, PyGtk and PyGobject are required to use Hob,
You have Gtk+ 2.22.0 and PyGtk 2.21.0.

From a user&apos;s view, he should think that it lacks of PyGobject, but the real problem is that the version of Gtk+ or PyGtk doesn&apos;t meet, this confuses the user. It would be good if it can tell the user clearly what&apos;s wrong.

Another problem is that, bitbake/lib/bb/ui/hob.py:

 33     if gtkver  &lt; (2, 20, 0) or pygtkver &lt; (2, 22, 0):
 34         sys.exit(&quot;%s,\nYou have Gtk+ %s and PyGtk %s.&quot; % (requirements,
 35                 &quot;.&quot;.join(map(str, gtkver)),
 36                 &quot;.&quot;.join(map(str, pygtkver))))

Usually, The gtk version is greater than or equal to the pygtk on a host, but it seems that hob requires a greater version of pygtk than gtk, which seems strange.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21717</commentid>
    <comment_count>1</comment_count>
    <who name="Shane Wang">shane.wang</who>
    <bug_when>2012-05-30 03:04:24 +0000</bug_when>
    <thetext>Give it to Josh since he made the change of the code piece you mentioned. I also prefer Hob can run on Ubuntu 10.04, otherwise it is very inconvenient for me to test with my Ubuntu 10.04 machine. Just a suggestion;-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21718</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-05-30 03:08:21 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Give it to Josh since he made the change of the code piece you mentioned. I
&gt; also prefer Hob can run on Ubuntu 10.04, otherwise it is very inconvenient
&gt; for me to test with my Ubuntu 10.04 machine. Just a suggestion;-)

I used the following patch to make it work on Ubuntu 10.10 (change the required version lower), maybe you can try a similar change on Ubuntu 10.04:

diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -30,7 +30,7 @@ try:
     pygtk.require(&apos;2.0&apos;) # to be certain we don&apos;t have gtk+ 1.x !?!
     gtkver = gtk.gtk_version
     pygtkver = gtk.pygtk_version
-    if gtkver  &lt; (2, 20, 0) or pygtkver &lt; (2, 22, 0):
+    if gtkver  &lt; (2, 20, 0) or pygtkver &lt; (2, 21, 0):
         sys.exit(&quot;%s,\nYou have Gtk+ %s and PyGtk %s.&quot; % (requirements,
                 &quot;.&quot;.join(map(str, gtkver)),
                 &quot;.&quot;.join(map(str, pygtkver))))</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21719</commentid>
    <comment_count>3</comment_count>
    <who name="Shane Wang">shane.wang</who>
    <bug_when>2012-05-30 03:13:28 +0000</bug_when>
    <thetext>Robert, you can&apos;t change it in that way. Here is the conversation between Josh and me.

Hi Shane,

On 22/05/12 18:35, Wang, Shane wrote:
&gt; Josh, I just found I can&apos;t run Hob on my Ubuntu 10.04 after I checked out the latest master.
&gt;
&gt; Since Ubuntu 10.04 is a long-term-support version, can we do something to make Hob compatible with that?

The plan is to provide an external-python-tarball with a full Gtk+ &amp; 
PyGtk nativesdk stack built by OE-Core/Poky and installed into a 
standalone sysroot on the users host.

Whilst I have a branch based on some work by Richard to achieve this it 
hasn&apos;t been submitted to upstream as I haven&apos;t figured out a clean way 
to handle things on the SDK host which would usually require a 
postinstall in the target rootfs.

Aside: I really can&apos;t see a clean way around requiring postinst type 
functionality for the SDK targets, particularly in the pagno case here. 
I&apos;m currently ruminating on supercharging the toolchain scripts to 
handle this.

&gt; What kind of failure did you meet on Ubuntu 10.04?

IIRC the set_action_widget() API I referred to in the original email 
isn&apos;t available in the version of Gtk+ and PyGtk that was shipped with 
Ubuntu 10.04.

This is required to add the search entry to the gtk.Notebook.

Cheers,
Joshua</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21720</commentid>
    <comment_count>4</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-05-30 03:18:46 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Robert, you can&apos;t change it in that way. Here is the conversation between
&gt; Josh and me.
&gt; 

Thanks, I just used it as a work around:-)

// Robert

&gt; Hi Shane,
&gt; 
&gt; On 22/05/12 18:35, Wang, Shane wrote:
&gt; &gt; Josh, I just found I can&apos;t run Hob on my Ubuntu 10.04 after I checked out the latest master.
&gt; &gt;
&gt; &gt; Since Ubuntu 10.04 is a long-term-support version, can we do something to make Hob compatible with that?
&gt; 
&gt; The plan is to provide an external-python-tarball with a full Gtk+ &amp; 
&gt; PyGtk nativesdk stack built by OE-Core/Poky and installed into a 
&gt; standalone sysroot on the users host.
&gt; 
&gt; Whilst I have a branch based on some work by Richard to achieve this it 
&gt; hasn&apos;t been submitted to upstream as I haven&apos;t figured out a clean way 
&gt; to handle things on the SDK host which would usually require a 
&gt; postinstall in the target rootfs.
&gt; 
&gt; Aside: I really can&apos;t see a clean way around requiring postinst type 
&gt; functionality for the SDK targets, particularly in the pagno case here. 
&gt; I&apos;m currently ruminating on supercharging the toolchain scripts to 
&gt; handle this.
&gt; 
&gt; &gt; What kind of failure did you meet on Ubuntu 10.04?
&gt; 
&gt; IIRC the set_action_widget() API I referred to in the original email 
&gt; isn&apos;t available in the version of Gtk+ and PyGtk that was shipped with 
&gt; Ubuntu 10.04.
&gt; 
&gt; This is required to add the search entry to the gtk.Notebook.
&gt; 
&gt; Cheers,
&gt; Joshua</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22588</commentid>
    <comment_count>5</comment_count>
    <who name="Dongxiao Xu">dongxiao.xu</who>
    <bug_when>2012-06-26 07:56:08 +0000</bug_when>
    <thetext>Shane has fixed this bug in commit: &quot;efd977010ea4c9f611089b19cebb81f7a501dafa&quot;.

For the issue of &quot;Usually, The gtk version is greater than or equal to the pygtk on a host, but it seems that hob requires a greater version of pygtk than gtk, which seems strange.&quot;, for GTK versions, there are: &quot;2.16, 2.18, 2.20, 2.24&quot;, and for pyGTK, the versions are: &quot;2.16, 2.17, 2.21, 2.22&quot;, therefore the current judgement: &quot;if gtkver  &lt; (2, 20, 0) or pygtkver &lt; (2, 21, 0):&quot; does make sense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23115</commentid>
    <comment_count>6</comment_count>
    <who name="liang li">liang.li2</who>
    <bug_when>2012-07-16 10:14:00 +0000</bug_when>
    <thetext>verified:
git info:   eb0cb7e8234f5d2e5623406e9660be91cf52f65e
git branch: poky/master</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>