<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/utils.py, branch 2.2_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=2.2_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=2.2_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2016-07-20T09:23:46+00:00</updated>
<entry>
<title>bitbake: bitbake: utils: add BBSERVER to the list of preserved variables</title>
<updated>2016-07-20T09:23:46+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-07-18T16:07:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b190c08b4866c5bfaca3bf8fc84c8ece486348d6'/>
<id>urn:sha1:b190c08b4866c5bfaca3bf8fc84c8ece486348d6</id>
<content type='text'>
All environment variables that are not in the list returned by
preserved_envvars_exported are cleaned by bb.utils.clean_environment.

Added BBSERVER to the list as we need to access it in bb/main.py
after the call of bb.utils.clean_environment.

(Bitbake rev: 15c4ea679f4fe097a9f21cccfc82907b5f39a4e4)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/utils: no need to unsetenv when manipulating os.environ</title>
<updated>2016-07-20T09:23:45+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2016-07-18T22:10:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dead7b22b4af5292c1a350ac09654b835f5aa4e5'/>
<id>urn:sha1:dead7b22b4af5292c1a350ac09654b835f5aa4e5</id>
<content type='text'>
Doing both os.unsetenv(foo) and then del os.environ[foo] is pointless as del
will call unsetenv automatically.

(Bitbake rev: a4463e2ff3c7d234320176d671719243292f1af0)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/utils.py: return sorted OrderedDict in explode_dep_versions2</title>
<updated>2016-07-19T07:56:51+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2016-07-18T03:42:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7a220aeaae6ae9a110a77a04c7772f196ae895a1'/>
<id>urn:sha1:7a220aeaae6ae9a110a77a04c7772f196ae895a1</id>
<content type='text'>
The OrderedDict's item is sorted by insertion order, there might be a
problem when build the same recipe again, for example:
- First build of acl:
  Depends: libattr1 (&gt;= 2.4.47), libc6 (&gt;= 2.24)
- Second build of acl:
  Depends: libc6 (&gt;= 2.24), libattr1 (&gt;= 2.4.47)

They are exactly the same depends, but tools like "diff" doesn't think
so. Return sorted OrderedDict will fix the problem.

(Bitbake rev: a392f19f16ef8202ce3c12afbeb186a02438da17)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/utils: fix set_process_name</title>
<updated>2016-07-19T07:47:06+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2016-07-12T15:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b7a741cbca043cc17b7e9798531813c932f5c103'/>
<id>urn:sha1:b7a741cbca043cc17b7e9798531813c932f5c103</id>
<content type='text'>
With Python 3 create_string_buffer needs a bytes() not a str() but as we were
catching all exceptions nobody noticed.

[ YOCTO #9910 ]

(Bitbake rev: 6576a9a95486c28a01d4211b4a33cc3e2c55a7cc)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: data_smart/utils: Add 'd' to the context used for better_eval in python expansion</title>
<updated>2016-06-13T11:16:10+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-06-09T21:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f2e5d884617d22d8bb473db6848e3dcc68813b9d'/>
<id>urn:sha1:f2e5d884617d22d8bb473db6848e3dcc68813b9d</id>
<content type='text'>
If a line like:

foo=${@' '.join([d.getVar('D', True) + x for x in (' '.join([d.getVar('FILES_bash-' + p, True) or '' for p in ['lib', 'dev', 'staticdev', 'doc', 'locale', 'ptest']])).split()])}

is added to a function like do_install, it fails with Exception name 'd'
is not defined. This is due to a change of behaviour in python 3 compared
to python 2. Generator expressions, dict comprehensions  and set comprehensions
are executed in a new scope but list comprehensions in python 2.x are not. In
python 3 they all use a new scope.

To allow these kinds of expressions to work, the easiest approach is
to add 'd' to the global context. To do this, an extra optional parameter
is added to better_eval and we use that to add 'd'.

(Bitbake rev: 8f74881037bb01013d3d439dc0c269909a198c1c)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: toaster: fix imports to work for python 3</title>
<updated>2016-06-02T07:24:03+00:00</updated>
<author>
<name>Ed Bartosh</name>
<email>ed.bartosh@linux.intel.com</email>
</author>
<published>2016-05-10T11:35:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0224f7599995166e15d1ea2d1b0e6155f5026a18'/>
<id>urn:sha1:0224f7599995166e15d1ea2d1b0e6155f5026a18</id>
<content type='text'>
Some APIs have been moved to other modules in python 3:
 getstatusoutput: moved from commands to subproces
 urlopen: moved from urllib2 to urllib.request
 urlparse: moved from urlparse to urllib.parse

Made the imports work for both python versions by
catching ImportError and importing APIs from different
modules.

[YOCTO #9584]

(Bitbake rev: 1abaa1c6a950b327e6468192dd910549643768bb)

Signed-off-by: Ed Bartosh &lt;ed.bartosh@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Convert to python 3</title>
<updated>2016-06-02T07:24:02+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-05-12T07:30:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0f2c59367a649de5f57acdccfb4f1fdba9cde730'/>
<id>urn:sha1:0f2c59367a649de5f57acdccfb4f1fdba9cde730</id>
<content type='text'>
Various misc changes to convert bitbake to python3 which don't warrant
separation into separate commits.

(Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: utils: Force bitbake to en_US.UTF-8 locale setting everywhere</title>
<updated>2016-05-13T12:41:32+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-05-11T22:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a0db1211caf364ec69502b82e583e074431d642a'/>
<id>urn:sha1:a0db1211caf364ec69502b82e583e074431d642a</id>
<content type='text'>
Under python 3, if we spawn python processes, we need to have a UTF-8
locale, else python's file access methods will use ascii. You can't
change that mode once the interpreter is started so we have to ensure
a locale is set. Ideally we'd use C.UTF-8 since OE already forces the
C locale but not all distros support that and we need to set something.
Was tempted to choose en_GB so colour gets spelt correctly :).

This is in some ways pretty nasty, forcing it into the environment
everywhere however we only have a limited number of ways of making
everything work correctly and this beats having to add utf-8 encoding
to every file access command.

A similar change will be needed to bitbake.conf in OE.

(Bitbake rev: 8902c29638411d312e6fc4a197707e5742652e15)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: lib/bb/utils.py: Fix explode_dep_versions2() determinism issue</title>
<updated>2016-05-11T09:34:30+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-05-09T13:07:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=442acd2ea910609b4ad1d22a6522d3d9128c7100'/>
<id>urn:sha1:442acd2ea910609b4ad1d22a6522d3d9128c7100</id>
<content type='text'>
When we pass data into explode_dep_versions2(), we need to result to be
able to be processed in a deterministic way so that we end up with
consistent hash values. This means we need an ordered structure rather
than an unordered one.

To do this, return an OrderedDict() rather than a dict().

(Bitbake rev: 0737e003ca549d08a7dfe13452ae982f2e11fecd)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Update logger.warn() -&gt; logger.warning()</title>
<updated>2016-05-11T09:34:30+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2016-05-09T13:01:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=654eadfa30624c62018665da618287b6cb5c7e3c'/>
<id>urn:sha1:654eadfa30624c62018665da618287b6cb5c7e3c</id>
<content type='text'>
python deprecated logger.warn() in favour of logger.warning(). This is only
used in bitbake code so we may as well just translate everything to avoid
warnings under python 3. Its safe for python 2.7.

(Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
