diff options
author | Thomas Roos <throos@amazon.de> | 2022-06-28 10:32:14 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-01 11:31:42 +0100 |
commit | 603652a38e7b76fa93090c7eaaf2dc4e8f146f0e (patch) | |
tree | 441f759c0225824ee20ac66b26cddf71ae5d46c8 /meta/lib | |
parent | 6958024ed2aa199e56851bf960c06dec1a3d81a1 (diff) | |
download | poky-603652a38e7b76fa93090c7eaaf2dc4e8f146f0e.tar.gz |
recipetool/devtool: Fix python egg whitespace issues in PACKAGECONFIG
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: a854d95a79e64f3f82abfa4cc1daec750abf4249)
Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 3eea2b1a0e..ddf6c0c9f8 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py | |||
@@ -444,7 +444,7 @@ class DevtoolAddTests(DevtoolBase): | |||
444 | checkvars['S'] = '${WORKDIR}/MarkupSafe-%s' % testver | 444 | checkvars['S'] = '${WORKDIR}/MarkupSafe-%s' % testver |
445 | checkvars['SRC_URI'] = url | 445 | checkvars['SRC_URI'] = url |
446 | self._test_recipe_contents(recipefile, checkvars, []) | 446 | self._test_recipe_contents(recipefile, checkvars, []) |
447 | 447 | ||
448 | def test_devtool_add_fetch_git(self): | 448 | def test_devtool_add_fetch_git(self): |
449 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | 449 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') |
450 | self.track_for_cleanup(tempdir) | 450 | self.track_for_cleanup(tempdir) |
@@ -544,6 +544,19 @@ class DevtoolAddTests(DevtoolBase): | |||
544 | # Test devtool build | 544 | # Test devtool build |
545 | result = runCmd('devtool build %s' % pn) | 545 | result = runCmd('devtool build %s' % pn) |
546 | 546 | ||
547 | def test_devtool_add_python_egg_requires(self): | ||
548 | # Fetch source | ||
549 | tempdir = tempfile.mkdtemp(prefix='devtoolqa') | ||
550 | self.track_for_cleanup(tempdir) | ||
551 | testver = '0.14.0' | ||
552 | url = 'https://files.pythonhosted.org/packages/e9/9e/25d59f5043cf763833b2581c8027fa92342c4cf8ee523b498ecdf460c16d/uvicorn-%s.tar.gz' % testver | ||
553 | testrecipe = 'python3-uvicorn' | ||
554 | srcdir = os.path.join(tempdir, testrecipe) | ||
555 | # Test devtool add | ||
556 | self.track_for_cleanup(self.workspacedir) | ||
557 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | ||
558 | result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url)) | ||
559 | |||
547 | class DevtoolModifyTests(DevtoolBase): | 560 | class DevtoolModifyTests(DevtoolBase): |
548 | 561 | ||
549 | def test_devtool_modify(self): | 562 | def test_devtool_modify(self): |