All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core 0/2] Ensure sdk.py knows about nativesdk-intercepts
@ 2023-09-12 16:50 Eilís 'pidge' Ní Fhlannagáin
  2023-09-12 16:50 ` [OE-core 1/2] lib/oe/package_managegment: Add nativesdk-intercept PATH Eilís 'pidge' Ní Fhlannagáin
  2023-09-12 16:50 ` [OE-core 2/2] update_mandb: deb fails due to missing man cache Eilís 'pidge' Ní Fhlannagáin
  0 siblings, 2 replies; 3+ messages in thread
From: Eilís 'pidge' Ní Fhlannagáin @ 2023-09-12 16:50 UTC (permalink / raw)
  To: openembedded-devel

This patch series ensures that do_populate_sdk knows about
nativesdk-intercepts. It also ensures that debian builds work with
update_mandb.

Eilís 'pidge' Ní Fhlannagáin (2):
  lib/oe/package_managegment: Add nativesdk-intercept PATH
  update_mandb: deb fails due to missing man cache

 meta/lib/oe/package_manager/deb/sdk.py   | 5 +++++
 meta/lib/oe/package_manager/ipk/sdk.py   | 5 +++++
 meta/lib/oe/package_manager/rpm/sdk.py   | 5 +++++
 scripts/postinst-intercepts/update_mandb | 2 ++
 4 files changed, 17 insertions(+)

-- 
2.34.1



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

* [OE-core 1/2] lib/oe/package_managegment: Add nativesdk-intercept PATH
  2023-09-12 16:50 [OE-core 0/2] Ensure sdk.py knows about nativesdk-intercepts Eilís 'pidge' Ní Fhlannagáin
@ 2023-09-12 16:50 ` Eilís 'pidge' Ní Fhlannagáin
  2023-09-12 16:50 ` [OE-core 2/2] update_mandb: deb fails due to missing man cache Eilís 'pidge' Ní Fhlannagáin
  1 sibling, 0 replies; 3+ messages in thread
From: Eilís 'pidge' Ní Fhlannagáin @ 2023-09-12 16:50 UTC (permalink / raw)
  To: openembedded-devel

[YOCTO #15023]

This patch adds (and removes after function execution) the
nativesdk-intercept/chown|chgrp PATH before target_pm.run_intercepts
calls during populate_sdk builds.

This has been tested with cleanall builds and testsdk and fails on deb
due to an issue where $D${localstatedir}/cache/man/ does not exist for
some reason. I've a work around for that in the next patch in this
series.

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
---
 meta/lib/oe/package_manager/deb/sdk.py | 5 +++++
 meta/lib/oe/package_manager/ipk/sdk.py | 5 +++++
 meta/lib/oe/package_manager/rpm/sdk.py | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/meta/lib/oe/package_manager/deb/sdk.py b/meta/lib/oe/package_manager/deb/sdk.py
index 653e42ab3c0..6f3005053eb 100644
--- a/meta/lib/oe/package_manager/deb/sdk.py
+++ b/meta/lib/oe/package_manager/deb/sdk.py
@@ -69,7 +69,12 @@ class PkgSdk(Sdk):
 
         self.target_pm.run_pre_post_installs()
 
+        env_bkp = os.environ.copy()
+        os.environ['PATH'] = self.d.expand("${COREBASE}/scripts/nativesdk-intercept") + \
+                             os.pathsep + os.environ["PATH"]
+
         self.target_pm.run_intercepts(populate_sdk='target')
+        os.environ.update(env_bkp)
 
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
diff --git a/meta/lib/oe/package_manager/ipk/sdk.py b/meta/lib/oe/package_manager/ipk/sdk.py
index 6a1f167fb77..cc7a7ede547 100644
--- a/meta/lib/oe/package_manager/ipk/sdk.py
+++ b/meta/lib/oe/package_manager/ipk/sdk.py
@@ -63,7 +63,12 @@ class PkgSdk(Sdk):
 
         self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
 
+        env_bkp = os.environ.copy()
+        os.environ['PATH'] = self.d.expand("${COREBASE}/scripts/nativesdk-intercept") + \
+                             os.pathsep + os.environ["PATH"]
+
         self.target_pm.run_intercepts(populate_sdk='target')
+        os.environ.update(env_bkp)
 
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
diff --git a/meta/lib/oe/package_manager/rpm/sdk.py b/meta/lib/oe/package_manager/rpm/sdk.py
index 85df6e949cc..ea79fe050bc 100644
--- a/meta/lib/oe/package_manager/rpm/sdk.py
+++ b/meta/lib/oe/package_manager/rpm/sdk.py
@@ -67,7 +67,12 @@ class PkgSdk(Sdk):
 
         self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
 
+        env_bkp = os.environ.copy()
+        os.environ['PATH'] = self.d.expand("${COREBASE}/scripts/nativesdk-intercept") + \
+                             os.pathsep + os.environ["PATH"]
+
         self.target_pm.run_intercepts(populate_sdk='target')
+        os.environ.update(env_bkp)
 
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
-- 
2.34.1



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

* [OE-core 2/2] update_mandb: deb fails due to missing man cache
  2023-09-12 16:50 [OE-core 0/2] Ensure sdk.py knows about nativesdk-intercepts Eilís 'pidge' Ní Fhlannagáin
  2023-09-12 16:50 ` [OE-core 1/2] lib/oe/package_managegment: Add nativesdk-intercept PATH Eilís 'pidge' Ní Fhlannagáin
@ 2023-09-12 16:50 ` Eilís 'pidge' Ní Fhlannagáin
  1 sibling, 0 replies; 3+ messages in thread
From: Eilís 'pidge' Ní Fhlannagáin @ 2023-09-12 16:50 UTC (permalink / raw)
  To: openembedded-devel

This only occurs in debian package builds when populating the sdk
and is a work around that seems to work. Eventually we should look
at why this is failing (I have ideas, it's somewhere in
lib/oe/package_management/deb/sdk.py), but for now, do this so we can
fix the core issue with nativesdk-intercepts.

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
---
 scripts/postinst-intercepts/update_mandb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/postinst-intercepts/update_mandb b/scripts/postinst-intercepts/update_mandb
index a061bb426a6..f91bafdb117 100644
--- a/scripts/postinst-intercepts/update_mandb
+++ b/scripts/postinst-intercepts/update_mandb
@@ -9,6 +9,8 @@ set -eu
 CONFIG=$(mktemp --tmpdir update-mandb.XXXXX)
 sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf > $CONFIG
 
+mkdir -p $D${localstatedir}/cache/man/
+
 PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${bindir}/mandb --config-file $CONFIG --create
 
 rm -f $CONFIG
-- 
2.34.1



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

end of thread, other threads:[~2023-09-12 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12 16:50 [OE-core 0/2] Ensure sdk.py knows about nativesdk-intercepts Eilís 'pidge' Ní Fhlannagáin
2023-09-12 16:50 ` [OE-core 1/2] lib/oe/package_managegment: Add nativesdk-intercept PATH Eilís 'pidge' Ní Fhlannagáin
2023-09-12 16:50 ` [OE-core 2/2] update_mandb: deb fails due to missing man cache Eilís 'pidge' Ní Fhlannagáin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.