diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-14 14:38:21 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-26 15:30:40 +0000 |
| commit | d907873a54da9ce28ab753763f59de98e6c802d2 (patch) | |
| tree | d45b5677adb557943ab0782f649f4f898396f66f | |
| parent | 1ff574dd168282c6ecf20e37691181e5559e047d (diff) | |
| download | poky-d907873a54da9ce28ab753763f59de98e6c802d2.tar.gz | |
package_manager/deb: Fix image generation with package removal
When building SDKs with the deb backend you could see errors like:
Setting up nativesdk-python3-ndg-httpsclient (0.5.1-r0) ...
mkdir: cannot create directory ‘/usr/lib/opkg’: Permission denied
dpkg: error processing package nativesdk-python3-ndg-httpsclient (--configure):
which is due to environment misconfiguration when removing packages.
Fix this by setting the same environment variables as used for installation.
(From OE-Core rev: ffdd5e3d61995f78aa57a7f45d21ebc1513cb5a4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f23c7e319a192ada14bb9a82822ef2967309aaea)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oe/package_manager/deb/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py index 5120920e70..0f9b27f831 100644 --- a/meta/lib/oe/package_manager/deb/__init__.py +++ b/meta/lib/oe/package_manager/deb/__init__.py | |||
| @@ -312,6 +312,10 @@ class DpkgPM(OpkgDpkgPM): | |||
| 312 | if not pkgs: | 312 | if not pkgs: |
| 313 | return | 313 | return |
| 314 | 314 | ||
| 315 | os.environ['D'] = self.target_rootfs | ||
| 316 | os.environ['OFFLINE_ROOT'] = self.target_rootfs | ||
| 317 | os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs | ||
| 318 | os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs | ||
| 315 | os.environ['INTERCEPT_DIR'] = self.intercepts_dir | 319 | os.environ['INTERCEPT_DIR'] = self.intercepts_dir |
| 316 | 320 | ||
| 317 | if with_dependencies: | 321 | if with_dependencies: |
