From: Richard Leitner <[email protected]>

During the do_populate_sdk task apt-get purge is called by deb's remove
function. This fails with error messages similiar to the following one
if any of the included packages uses intercepts as the INTERCEPT_DIR
isn't exported:

.../*.postinst: line 4: /postinst_intercept: No such file or directory

Therefore fix it by exporting the INTERCEPT_DIR variable within the
remove function.

Signed-off-by: Richard Leitner <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit f18adf53dd4bf5dd3adef82b2dcc34a6cdfd0c89)
Signed-off-by: Anuj Mittal <[email protected]>
---
 meta/lib/oe/package_manager/deb/__init__.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oe/package_manager/deb/__init__.py 
b/meta/lib/oe/package_manager/deb/__init__.py
index 26157f591a..5120920e70 100644
--- a/meta/lib/oe/package_manager/deb/__init__.py
+++ b/meta/lib/oe/package_manager/deb/__init__.py
@@ -312,6 +312,8 @@ class DpkgPM(OpkgDpkgPM):
         if not pkgs:
             return
 
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
+
         if with_dependencies:
             os.environ['APT_CONFIG'] = self.apt_conf_file
             cmd = "%s purge %s" % (self.apt_get_cmd, ' '.join(pkgs))
-- 
2.29.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148466): 
https://lists.openembedded.org/g/openembedded-core/message/148466
Mute This Topic: https://lists.openembedded.org/mt/80827842/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to