public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [poky][PATCH 0/1] setuptools3: adding sanity check to detect python-eggs install
@ 2023-03-29  8:08 loc.renesas
  2023-03-29  8:08 ` [poky][PATCH 1/1] " loc.renesas
  0 siblings, 1 reply; 2+ messages in thread
From: loc.renesas @ 2023-03-29  8:08 UTC (permalink / raw)
  To: openembedded-core

From: Loc Nguyen <loc.nguyen.wt@renesas.com>

I'm a new comer, please help to review and feedback.
We are planning to contribute to yocto prj, beginning with fixing newcomer's
bug at: https://bugzilla.yoctoproject.org/show_bug.cgi?id=5725

The following changes since commit 23212c8c44315ed6612009e0e667d14ad26459b0:

  rpm: fix RPM_ETCCONFIGDIR value in SDK (2023-03-22 23:17:27 +0000)

are available in the Git repository at:

  https://git.yoctoproject.org/poky-contrib locNg/bugfix_bug5725
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=locNg/bugfix_bug5725

Loc Nguyen (1):
  setuptools3: adding sanity check to detect python-eggs install

 meta/classes-recipe/setuptools3.bbclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [poky][PATCH 1/1] setuptools3: adding sanity check to detect python-eggs install
  2023-03-29  8:08 [poky][PATCH 0/1] setuptools3: adding sanity check to detect python-eggs install loc.renesas
@ 2023-03-29  8:08 ` loc.renesas
  0 siblings, 0 replies; 2+ messages in thread
From: loc.renesas @ 2023-03-29  8:08 UTC (permalink / raw)
  To: openembedded-core

From: Loc Nguyen <loc.nguyen.wt@renesas.com>

Packages that install Python modules shouldn't be installing Eggs,
as distro-managed modules should be "bare"

Added a sanity check to verify if python modules will install Eggs.
If yes, display a warning message to user.

See [YOCTO #5725] for more details

Signed-off-by: Loc Nguyen <loc.nguyen.wt@renesas.com>
---
 meta/classes-recipe/setuptools3.bbclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass
index 4c6e79ee9a..1ce470f7e3 100644
--- a/meta/classes-recipe/setuptools3.bbclass
+++ b/meta/classes-recipe/setuptools3.bbclass
@@ -33,6 +33,16 @@ setuptools3_do_install() {
         python_pep517_do_install
 }
 
+python do_sanity_check() {
+    # Python modules shouldn't be installing Eggs, as distro-managed modules should be "bare"
+    pkgName = d.getVar('BPN')
+    rdeps = d.getVar('RDEPENDS_' + pkgName) or ""
+    if ('python-eggs' in rdeps) or ('python3-eggs' in rdeps):
+        bb.warn(pkgName + ' is installing Eggs.')
+}
+
+addtask sanity_check before do_fetch
+
 EXPORT_FUNCTIONS do_configure do_compile do_install
 
 export LDSHARED="${CCLD} -shared"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-29  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-29  8:08 [poky][PATCH 0/1] setuptools3: adding sanity check to detect python-eggs install loc.renesas
2023-03-29  8:08 ` [poky][PATCH 1/1] " loc.renesas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox