diff options
author | Jussi Kukkonen <jussi.kukkonen@intel.com> | 2016-11-04 15:16:49 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-07 10:38:00 +0000 |
commit | 17ad91acd5f63f04bd3925b2943363e3068e7303 (patch) | |
tree | 6bbf66de38d93b1c0cae18a9d9bc3110af00d456 /meta/recipes-devtools/run-postinsts | |
parent | 9d615246955f85320a932d37992d60e3f95eb299 (diff) | |
download | poky-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/run-postinsts')
-rwxr-xr-x | meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 10 |
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 | |||
16 | for pm in $backend_list; do | 16 | for pm in $backend_list; do |
17 | pi_dir="#SYSCONFDIR#/$pm-postinsts" | 17 | pi_dir="#SYSCONFDIR#/$pm-postinsts" |
18 | 18 | ||
19 | [ -d $pi_dir ] && break | 19 | if [ ! -d $pi_dir ]; then |
20 | continue | ||
21 | fi | ||
20 | 22 | ||
23 | # found the package manager, it has postinsts | ||
21 | case $pm in | 24 | case $pm in |
22 | "deb") | 25 | "deb") |
23 | if [ -s "#LOCALSTATEDIR#/lib/dpkg/status" ]; then | 26 | if [ -s "#LOCALSTATEDIR#/lib/dpkg/status" ]; then |
24 | pm_installed=true | 27 | pm_installed=true |
25 | break | ||
26 | fi | 28 | fi |
27 | ;; | 29 | ;; |
28 | 30 | ||
29 | "ipk") | 31 | "ipk") |
30 | if [ -s "/var/lib/opkg/status" ]; then | 32 | if [ -s "#LOCALSTATEDIR#/lib/opkg/status" ]; then |
31 | pm_installed=true | 33 | pm_installed=true |
32 | break | ||
33 | fi | 34 | fi |
34 | ;; | 35 | ;; |
35 | esac | 36 | esac |
37 | break | ||
36 | done | 38 | done |
37 | 39 | ||
38 | remove_rcsd_link () { | 40 | remove_rcsd_link () { |