[oe-commits] [openembedded-core] 18/27: run-postinsts: Use opkg/dpkg to configure when possible

git at git.openembedded.org git at git.openembedded.org
Wed Dec 7 10:38:45 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit b645919f173512f9e75aeb26348d60b63dcdc53c
Author: Jussi Kukkonen <jussi.kukkonen at intel.com>
AuthorDate: Fri Nov 4 15:16:49 2016 +0200

    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].
    
    Signed-off-by: Jussi Kukkonen <jussi.kukkonen at intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 .../recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 10 ++++++----
 1 file 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 04ba394..10f2118 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 () {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list