classes/create-spdx-2.2: Add missing import oe.packagedata
PATCH 1/1 classes/create-spdx-2.2: Add missing import oe.packagedata
Add missing import statement to fix build failures:
File: '/scratch/jenkins_builds/arago-master-wip/build/sources/oe-core/meta/classes/create-spdx-2.2.bbclass', lineno: 722, function: collect_package_providers
0718: deps.append((d.getVar("PN"), d.getVar("BB_HASHFILENAME")))
0719:
0720: for dep_pn, dep_hashfn in deps:
0721: localdata = d
*** 0722: recipe_data = oe.packagedata.read_pkgdata(dep_pn, localdata)
0723: if not recipe_data:
0724: localdata = bb.data.createCopy(d)
0725: localdata.setVar("PKGDATA_DIR", "${PKGDATA_DIR_SDK}")
0726: recipe_data = oe.packagedata.read_pkgdata(dep_pn, localdata)
Exception: AttributeError: module 'oe' has no attribute 'packagedata'
--- meta/classes/create-spdx-2.2.bbclass | 1 + 1 file changed, 1 insertion(+)
meta/classes/create-spdx-2.2.bbclass +1 -0
@@ -708,6 +708,7 @@ def collect_package_providers(d): from pathlib import Path import oe.sbom import oe.spdx + import oe.packagedata import json deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX"))
Signature · 1 line
2.17.1
Quoted 24 lines · Ryan Eatmon via lists.openembedded.org
Add missing import statement to fix build failures:
File: '/scratch/jenkins_builds/arago-master-wip/build/sources/oe-core/meta/classes/create-spdx-2.2.bbclass', lineno: 722, function:
collect_package_providers
0718:deps.append((d.getVar("PN"), d.getVar("BB_HASHFILENAME")))
0719:
0720: fordep_pn,dep_hashfnin deps:
0721: localdata = d
*** 0722:recipe_data=oe.packagedata.read_pkgdata(dep_pn, localdata)
0723: if notrecipe_data:
0724: localdata =bb.data.createCopy(d)
0725:localdata.setVar("PKGDATA_DIR", "${PKGDATA_DIR_SDK}")
0726:recipe_data=oe.packagedata.read_pkgdata(dep_pn, localdata)
Exception: AttributeError: module 'oe' has no attribute 'packagedata'Signed-off-by Ryan Eatmon <[email protected]>--- meta/classes/create-spdx-2.2.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes/create-spdx-2.2.bbclass +0
-0
meta/classes/create-spdx-2.2.bbclass def collect_package_providers(d): · line 714
Quoted 7 lines
meta/classes/create-spdx-2.2.bbclass +1
-0@@ -708,6 +708,7 @@ def collect_package_providers(d): from pathlib import Path import oe.sbom import oe.spdx + import oe.packagedata import json deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX"))
We've realised that packagedata is missing in BBIMPORTS in meta/lib/oe/__init__.py which should fix this but also add missing dependency information so I'm likely to go with that change and this one shouldn't be needed. Let me know if that isn't the case.
Cheers,
Richard
Quoted 32 lines · Richard Purdie
Quoted 30 lines · Ryan Eatmon via lists.openembedded.org
Add missing import statement to fix build failures:
File: '/scratch/jenkins_builds/arago-master-wip/build/sources/oe-core/meta/classes/create-spdx-2.2.bbclass', lineno: 722, function:
collect_package_providers
0718:deps.append((d.getVar("PN"), d.getVar("BB_HASHFILENAME")))
0719:
0720: fordep_pn,dep_hashfnin deps:
0721: localdata = d
*** 0722:recipe_data=oe.packagedata.read_pkgdata(dep_pn, localdata)
0723: if notrecipe_data:
0724: localdata =bb.data.createCopy(d)
0725:localdata.setVar("PKGDATA_DIR", "${PKGDATA_DIR_SDK}")
0726:recipe_data=oe.packagedata.read_pkgdata(dep_pn, localdata)
Exception: AttributeError: module 'oe' has no attribute 'packagedata'Signed-off-by Ryan Eatmon <[email protected]>--- meta/classes/create-spdx-2.2.bbclass | 1 + 1 file changed, 1 insertion(+)meta/classes/create-spdx-2.2.bbclass +1
-0@@ -708,6 +708,7 @@ def collect_package_providers(d): from pathlib import Path import oe.sbom import oe.spdx + import oe.packagedata import json
Quoted 6 lines
meta/classes/create-spdx-2.2.bbclass def collect_package_providers(d): · line 714
Quoted 1 line
meta/classes/create-spdx-2.2.bbclass +0
-0deploy_dir_spdx = Path(d.getVar("DEPLOY_DIR_SPDX"))We've realised that packagedata is missing in BBIMPORTS in
meta/lib/oe/__init__.pywhich should fix this but also add missing dependency information so I'm likely to go with that change and this one shouldn't be needed. Let me know if that isn't the case.
Your fix is better as it should cover all cases and not just this one.
Quoted 3 lines
Cheers,
Richard
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS