[oe-commits] =?UTF-8?Q?Andr=C3=A9=20Draszik=20?=: run-postinsts: use ${localstatedir} instead of hardcoding /var/lib

git at git.openembedded.org git at git.openembedded.org
Tue Jul 28 17:03:08 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: faf9d7ee60d5b2bd5d0b70a9c6bb9847f6c2399e
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=faf9d7ee60d5b2bd5d0b70a9c6bb9847f6c2399e

Author: André Draszik <git at andred.net>
Date:   Fri Jul 24 13:48:47 2015 +0100

run-postinsts: use ${localstatedir} instead of hardcoding /var/lib

Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 2 +-
 meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb        | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index ac9cee6..58ea85e 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -20,7 +20,7 @@ for pm in $backend_list; do
 
 	case $pm in
 		"deb")
-			if [ -s "/var/lib/dpkg/status" ]; then
+			if [ -s "#LOCALSTATEDIR#/lib/dpkg/status" ]; then
 				pm_installed=true
 				break
 			fi
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index d126132..11c94e5 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -39,6 +39,7 @@ do_install() {
 	sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \
                -e 's:#SBINDIR#:${sbindir}:g' \
                -e 's:#BASE_BINDIR#:${base_bindir}:g' \
+               -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \
                ${D}${sbindir}/run-postinsts \
                ${D}${systemd_unitdir}/system/run-postinsts.service
 }



More information about the Openembedded-commits mailing list