Skip to contentSkip to conversation

run-postinsts: fix setting pi_dir

PATCH In review Trevor Woerner 2 participants 2 messages Dec 22, 2020 – Dec 24, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 run-postinsts: fix setting pi_dir

The pi_dir variable isn't being set properly; it gets set to the value of the *previous* package manager. Given the order of "rpm deb ipk", if the script determines that the package manager is "ipk", pi_dir remains set at SYSCONFDIR/deb-postinsts.

---
 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts +0 -2
index f84a7e18c8..c10fd11e9d 100755
@@ -20,14 +20,12 @@ for pm in $backend_list; do
 		"deb")
 			if [ -s "#LOCALSTATEDIR#/lib/dpkg/status" ]; then
 				pm_installed=true
-				break
 			fi
 			;;
 
 		"ipk")
 			if [ -s "#LOCALSTATEDIR#/lib/opkg/status" ]; then
 				pm_installed=true
-				break
 			fi
 			;;
 	esac
Signature · 1 line
2.30.0.rc0
#1 lore raw
Quoted 28 lines · Trevor Woerner

The pi_dir variable isn't being set properly; it gets set to the value of the
*previous* package manager. Given the order of "rpm deb ipk", if the script
determines that the package manager is "ipk", pi_dir remains set at SYSCONFDIR/deb-postinsts.

---
 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 2 --

 1 file changed, 2 deletions(-)
(quoted diff) +0 -0

postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run- postinsts
index f84a7e18c8..c10fd11e9d 100755

meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts +0 -0
@@ -20,14 +20,12 @@ for pm in $backend_list; do
                 "deb")
                         if [ -s "#LOCALSTATEDIR#/lib/dpkg/status" ];

then
                                pm_installed=true
-                               break
                        fi
                        ;;

Quoted 8 lines

                "ipk")
                        if [ -s "#LOCALSTATEDIR#/lib/opkg/status" ]; then
                                pm_installed=true
-                               break
                        fi
                        ;;
        esac

Just to confirm, this patch causes:

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/1668

(and other selftest builds failed the same way)

Cheers,

Richard