]> code.ossystems Code Review - openembedded-core.git/commitdiff
deb: export INTERCEPT_DIR for remove actions
authorRichard Leitner <richard.leitner@skidata.com>
Thu, 29 Oct 2020 18:20:14 +0000 (19:20 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 31 Oct 2020 08:53:13 +0000 (08:53 +0000)
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 <richard.leitner@skidata.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager/deb/__init__.py

index 26157f591a865e64ad0ee1999bff6361bc6af9ae..5120920e70e628649298ba32fb37b4e124f9d22a 100644 (file)
@@ -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))