aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-11-04 15:16:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-07 10:38:00 +0000
commit17ad91acd5f63f04bd3925b2943363e3068e7303 (patch)
tree6bbf66de38d93b1c0cae18a9d9bc3110af00d456 /meta/recipes-devtools
parent9d615246955f85320a932d37992d60e3f95eb299 (diff)
downloadopenembedded-core-contrib-17ad91acd5f63f04bd3925b2943363e3068e7303.tar.gz
run-postinsts: Use opkg/dpkg to configure when possible
Currently run-postinsts script has code to run postinst scripts via opkg/dpkg configure but that code is never used. The advantage of using package managers instead of just executing the scripts is to keep the package manager DB updated. Fix the script so that the package managers are used when appropriate. Also use $localstatedir for the opkg runtime file location. Fixes [YOCTO #10478]. (From OE-Core rev: b645919f173512f9e75aeb26348d60b63dcdc53c) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rwxr-xr-xmeta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 04ba3941bc..10f2118e96 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -16,23 +16,25 @@ pm_installed=false
for pm in $backend_list; do
pi_dir="#SYSCONFDIR#/$pm-postinsts"
- [ -d $pi_dir ] && break
+ if [ ! -d $pi_dir ]; then
+ continue
+ fi
+ # found the package manager, it has postinsts
case $pm in
"deb")
if [ -s "#LOCALSTATEDIR#/lib/dpkg/status" ]; then
pm_installed=true
- break
fi
;;
"ipk")
- if [ -s "/var/lib/opkg/status" ]; then
+ if [ -s "#LOCALSTATEDIR#/lib/opkg/status" ]; then
pm_installed=true
- break
fi
;;
esac
+ break
done
remove_rcsd_link () {