summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2018-03-28 21:47:08 +0200
committerAndreas Oberritter <obi@opendreambox.org>2020-07-02 15:10:00 +0200
commiteeb3d076466fba3ca824b9a1c298af7092698b57 (patch)
tree51bf521d0c674bd3ec332e29c4f7dade58a9448b
parentd9e51c8f185ddcaf17df5296a39b096b48ed391a (diff)
downloadopenembedded-core-contrib-eeb3d076466fba3ca824b9a1c298af7092698b57.tar.gz
rootfs.py: Stop hardcoding localstatedir as '/var' for dpkg
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/lib/oe/rootfs.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 2805b01264..4416d6a222 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -625,7 +625,7 @@ class DpkgRootfs(DpkgOpkgRootfs):
deb_pre_process_cmds = self.d.getVar('DEB_PREPROCESS_COMMANDS')
deb_post_process_cmds = self.d.getVar('DEB_POSTPROCESS_COMMANDS')
- alt_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/alternatives")
+ alt_dir = self.d.expand("${IMAGE_ROOTFS}${localstatedir}/lib/dpkg/alternatives")
bb.utils.mkdirhier(alt_dir)
# update PM index files
@@ -661,7 +661,7 @@ class DpkgRootfs(DpkgOpkgRootfs):
if self.progress_reporter:
self.progress_reporter.next_stage()
- self._setup_dbg_rootfs(['/var/lib/dpkg'])
+ self._setup_dbg_rootfs([self.d.getVar('localstatedir') + '/lib/dpkg'])
self.pm.fix_broken_dependencies()
@@ -675,12 +675,12 @@ class DpkgRootfs(DpkgOpkgRootfs):
return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMANDS']
def _get_delayed_postinsts(self):
- status_file = self.image_rootfs + "/var/lib/dpkg/status"
+ status_file = self.image_rootfs + self.d.getVar('localstatedir') + '/lib/dpkg/status'
return self._get_delayed_postinsts_common(status_file)
def _save_postinsts(self):
dst_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${sysconfdir}/deb-postinsts")
- src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/info")
+ src_postinst_dir = self.d.expand("${IMAGE_ROOTFS}${localstatedir}/lib/dpkg/info")
return self._save_postinsts_common(dst_postinst_dir, src_postinst_dir)
def _log_check(self):