Skip to contentSkip to conversation

deb: export INTERCEPT_DIR for remove actions

PATCH New Richard Leitner 1 participant 1 message Oct 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 deb: export INTERCEPT_DIR for remove actions

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.

---
 meta/lib/oe/package_manager/deb/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
meta/lib/oe/package_manager/deb/__init__.py +2 -0
index 6c56991911..10ad707c23 100644
@@ -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))
Signature · 1 line
2.28.0