<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/lib/recipetool, branch yocto-4.0.29</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-4.0.29</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-4.0.29'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-03-01T15:19:54+00:00</updated>
<entry>
<title>scripts: python 3.12 regex</title>
<updated>2024-03-01T15:19:54+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2024-02-21T19:37:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0269cfc91c28e2332a8f148fe68f63b69ebc8e61'/>
<id>urn:sha1:0269cfc91c28e2332a8f148fe68f63b69ebc8e61</id>
<content type='text'>
All the regexes throw a warning like this:

WARNING: scripts/lib/recipetool/create_buildsys.py:140:
      SyntaxWarning: invalid escape sequence '\s'
      proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE)

Python 3 interprets string literals as Unicode strings, and therefore
\s is treated as an escaped Unicode character which is not correct.
Declaring the RegEx pattern as a raw string instead of unicode is
required for Python 3.

(From OE-Core rev: 63998f13d5263ce19a60ed3fba1ac8b6f23558e3)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

Backported from master: 24b0ba00d4f0b4d9834f7693ecb6032dfc534a80

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>recipetool/create_buildsys_python: use importlib instead of imp</title>
<updated>2024-03-01T15:19:53+00:00</updated>
<author>
<name>Chris Laplante</name>
<email>chris.laplante@agilent.com</email>
</author>
<published>2024-02-21T19:36:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6e8300c5bc6a21310efd48baf97e8a153c427533'/>
<id>urn:sha1:6e8300c5bc6a21310efd48baf97e8a153c427533</id>
<content type='text'>
'imp' was deprecated in Python 3.4 and removed in 3.12. The
piece of importlib we use has been around since 3.3.

(From OE-Core rev: b9dcdf2346bb24866c5f3db96a3f79eba20e4662)

Signed-off-by: Chris Laplante &lt;chris.laplante@agilent.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

Cherry-picked from master: 457f0dad87b4e45a53865b5ad2c150215bd74019

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>recipetool: Fix inherit in created -native* recipes</title>
<updated>2023-08-02T14:47:13+00:00</updated>
<author>
<name>Yoann Congal</name>
<email>yoann.congal@smile.fr</email>
</author>
<published>2023-06-28T07:10:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=23af44f25450baf0d715b152b3fe008297377ae1'/>
<id>urn:sha1:23af44f25450baf0d715b152b3fe008297377ae1</id>
<content type='text'>
native and nativesdk classes are special and must be inherited last :
put them at the end of the gathered classes to inherit.

(From OE-Core rev: 2c92780236b25205af0dcf75de2d2ede14132152)

Signed-off-by: Yoann Congal &lt;yoann.congal@smile.fr&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit a6614fd800cbe791264aeb102d379ba79bd145c2)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>recipetool/devtool: Fix python egg whitespace issues in PACKAGECONFIG</title>
<updated>2022-07-08T07:27:16+00:00</updated>
<author>
<name>Thomas Roos</name>
<email>throos@amazon.de</email>
</author>
<published>2022-06-28T08:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0b047cb6e70ee65bd2b29a81a5ab0fbb5f8c7297'/>
<id>urn:sha1:0b047cb6e70ee65bd2b29a81a5ab0fbb5f8c7297</id>
<content type='text'>
Substitute expressions or whitespace from python egg requires.txt when
generating PACKAGECONFIG

Pysetuptools sees the uvicorn.egg-info/requires.txt as extra requirements.
Recipetool parses this information to generate the PACKAGECONFIG.
These extra requirements contain expressions and whitespace, which are not allowed in PACKGAGECONFIG.
This patch substitute them by hyphens to make PACKAGECONFIG parsable and readable.
Also adding an oe-selftest for this.

[YOCTO #14446]

(From OE-Core rev: 5a1fd88439c28c473a1723a040d780f100d6295e)

Signed-off-by: Thomas Roos &lt;throos@amazon.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit a854d95a79e64f3f82abfa4cc1daec750abf4249)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool/devtool: Further SPDX identifier cleanups</title>
<updated>2022-03-02T18:43:24+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-03-02T11:23:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8a1de49b565f528c9569cee522ff0ce1b2bc4d90'/>
<id>urn:sha1:8a1de49b565f528c9569cee522ff0ce1b2bc4d90</id>
<content type='text'>
Some of these are hard to know what to do with since the original source
files for the checksum aren't present. The safe option is to use "-only"
as often the main license is ambiguous and the source files themselves
determine the "or-later" possibility. The "-only" option therefore is
realistically what we need to use in this code.

(From OE-Core rev: 2b0cbafc7854de0308a624b17b8aaba704b031d5)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool: Use SPDX license identifiers</title>
<updated>2022-03-01T23:44:59+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2022-02-27T18:21:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=68d1a56e987ee530620bdf245ddf1812f8cf6d39'/>
<id>urn:sha1:68d1a56e987ee530620bdf245ddf1812f8cf6d39</id>
<content type='text'>
There are still a couple of cases where the license may be set as, e.g.,
"GPL" or "GPL-2.0" since there is not enough information to decide the
actual SPDX license. It is then assumed that the developer will have to
correct the information.

(From OE-Core rev: e7df51f8d2361e9fe2d67669d2e17f0a5d01004e)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool/create_buildsys_python: Add support for more known licenses</title>
<updated>2022-03-01T23:44:59+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2022-02-27T18:21:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=949aa76210b4de3eaab79d006af982ce8a44b29d'/>
<id>urn:sha1:949aa76210b4de3eaab79d006af982ce8a44b29d</id>
<content type='text'>
Add all OSI approved licenses from https://pypi.org/classifiers/. Also
add support for Other/Proprietary (Proprietary) and Public Domain (PD).

(From OE-Core rev: 99ef134d1019e5b98b845cf71f3eb39871218f9d)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool: Fix circular reference in SRC_URI</title>
<updated>2022-02-05T17:46:05+00:00</updated>
<author>
<name>Saul Wold</name>
<email>Saul.Wold@windriver.com</email>
</author>
<published>2022-02-03T19:43:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=254fbcf614cd57d5a5d4ca36b9765b463eaaf10f'/>
<id>urn:sha1:254fbcf614cd57d5a5d4ca36b9765b463eaaf10f</id>
<content type='text'>
When creating a new recipe.bb file for a binary, don't use BP which
includes the version information, instead use BPN which is just the
name base Package Name.

Since PB is not specified, it takes the default:
PV = "1.0+git${SRCPV}"

But SRCPV is defined in terms of the SRC_URI, which leads to infinite
recursion (traceback below). Here are the pertinent variables which
cause the recursion:

SRC_URI = "git://github.com/lvc/abi-dumper;protocol=https;subdir=${BP}"
BP = "${BPN}-${PV}"
PV = "1.0+git${SRCPV}"
SRCPV = "${@bb.fetch2.get_srcrev(d)}"

def get_srcrev(d, method_name='sortable_revision'):
    # ... trimmed
    scms = []
    fetcher = Fetch(d.getVar('SRC_URI').split(), d)
    # ... trimmed

[YOCTO #14040]

(From OE-Core rev: 3b8d43fc53ee13d39abc3b2a1f706a97fcf752aa)

Signed-off-by: Saul Wold &lt;saul.wold@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool/create_buildsys_python.py: less distutils</title>
<updated>2022-01-12T21:09:02+00:00</updated>
<author>
<name>Tim Orling</name>
<email>ticotimo@gmail.com</email>
</author>
<published>2022-01-11T19:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fe86a1464905b40a1e08868796e3a2dfab79813b'/>
<id>urn:sha1:fe86a1464905b40a1e08868796e3a2dfab79813b</id>
<content type='text'>
'distutils' is deprecated in Python 3.10 with removal in Python 3.12
(~October 2023). Replace 'distutils.command.build_py' with
'setuptools.command.build_py'.

To avoid an AttributeError, we call super().__init__() which provides
the missing 'distribution' attribute. However, for some reason, __init__()
in 'setuptools.command.build_py.build_py' class requires a 'dist' positional
argument which must be a 'Distribution' instance. It is not clear why
'distutils.command.build_py.build_py' class does not require this.

There is still a check which decides to inherit setuptools3 vs distutils3
that will need to be refactored when we add pyproject.toml and setup.cfg
support for more modern PEP 517 packaging.

Once distutils3.bbclass is dropped, any recipe inheriting distutils3
will throw a parsing error. The plan is to move distutils*.bbclasses to
meta-python. However if meta-python is not in bblayers, the parsing
error would still occur.

[YOCTO #14610]

(From OE-Core rev: 619a3eb1266459daf16e10386113e9201fbf9cf5)

Signed-off-by: Tim Orling &lt;tim.orling@konsulko.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>recipetool: Separate licenses with &amp; operator</title>
<updated>2021-12-20T15:29:01+00:00</updated>
<author>
<name>Stefan Herbrechtsmeier</name>
<email>stefan.herbrechtsmeier@weidmueller.com</email>
</author>
<published>2021-12-15T16:08:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=32f56de27851714082bcef2de9e783140e282cb0'/>
<id>urn:sha1:32f56de27851714082bcef2de9e783140e282cb0</id>
<content type='text'>
Separate licenses with &amp; operator since it should be satisfied most use
cases and it is a reasonable assumption that all the licenses apply.
Furthermore flat, split and sort the licenses to minimize license string
changes.

Separate package licenses with &amp; operator:
-LICENSE:${PN} = "MIT ISC"
+LICENSE:${PN} = "ISC &amp; MIT"

Respect | and brackets in LICENSE:
-LICENSE = "BSD-3-Clause &amp; (ISC &amp; | &amp; MIT)"
+LICENSE = "BSD-3-Clause &amp; (ISC | MIT)"

Sort licenses:
-LICENSE = "MIT &amp; BSD-3-Clause &amp; ISC"
+LICENSE = "BSD-3-Clause &amp; ISC &amp; MIT"

Remove duplicates:
-LICENSE = "MIT &amp; ISC &amp; MIT"
+LICENSE = "ISC &amp; MIT"

(From OE-Core rev: 60a84ecc53d20118c5e7f86dd3e3cafbfed1cf0a)

Signed-off-by: Stefan Herbrechtsmeier &lt;stefan.herbrechtsmeier@weidmueller.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
