[yocto] HOB usage

Sathishkumar Duraisamy bewithsathish at gmail.com
Sun Dec 11 21:20:20 PST 2011


Hi,

Today, I tried to reproduce the problem and magically, today, hob
works as expected.  So, I started once again with new config, and
again I tried to reproduce the problem. But the problem exists.

The reason for this, once we select our images in the
edit->preference, it writes our preference in the file hob-post.conf
file. But it doesn't parses it again unless we are restarting the hob
again.

Here are some code snippets that it confirms this:

In file scripts/hob,

#hob is started with reading these files.
bitbake -r conf/hob-pre.conf -R conf/hob-post.conf -u hob

In file poky-edison-6.0/bitbake/lib/bb/ui/hob.py

    def preferences_cb(self, action):
        resp = self.prefs.run()
        self.prefs.write_changes()
        self.prefs.hide()

which ultimately, calls poky-edison-6.0/bitbake/lib/bb/ui/crumbs/configrator.py

    def writeConfFile(self, conffile, contents):
        """
        Make a backup copy of conffile and write a new file in its stead with
        the lines in the contents list.
        """
        # Create a backup of the conf file
        bkup = "%s~" % conffile
        os.rename(conffile, bkup)

        # Write the contents list object to the conf file
        with open(conffile, "w") as new:
            new.write("".join(contents))


Here it just writes, but never parses it again. So, unless, we close
and restart hob, preferences doesn't take change.

So, have to fix this, to ask to parses it again once the changes are written.

-- 
Regards,
Sathishkumar D
http://flowersopenlab.weebly.com/



More information about the yocto mailing list