summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2016-12-21 12:32:47 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-09 13:39:11 +0000
commit41137c212cbc47e382dae5ce3de4f8217c2b5c4c (patch)
treeec8ad1b99b3314e3ce7d09f072dc833ed2dd2afb /meta
parent8db49696e46bc780d440f8d4985515bd0f9349d0 (diff)
downloadpoky-41137c212cbc47e382dae5ce3de4f8217c2b5c4c.tar.gz
opkg-utils: warn if update-alternatives finds priority conflict
If multiple providers for a utility have the same alternatives priority, which one would be chosen is determined by which one is installed later. Our alternatives system should be able to detect such problem and warn users so that potential problems could be avoided. Modify update-alternatives to warn users when detecting multiple providers with the same priority. [YOCTO #8314] (From OE-Core rev: 06cf956e3441868d69f81d6c034778d855ce1c98) (From OE-Core rev: 0b413d502868c89b7ddbe50a978317ffa774b3cc) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-warn-when-multiple-providers-hav.patch26
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_git.bb3
2 files changed, 28 insertions, 1 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-warn-when-multiple-providers-hav.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-warn-when-multiple-providers-hav.patch
new file mode 100644
index 0000000000..afce1e1cc2
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-warn-when-multiple-providers-hav.patch
@@ -0,0 +1,26 @@
1Subject: update-alternatives: warn when multiple providers have the same priority
2
3Upstream-Status: Pending
4
5Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
6---
7 update-alternatives | 3 +++
8 1 file changed, 3 insertions(+)
9
10diff --git a/update-alternatives b/update-alternatives
11index ca01d5d..ffad853 100644
12--- a/update-alternatives
13+++ b/update-alternatives
14@@ -90,6 +90,9 @@ add_alt() {
15 local path="$2"
16 local priority="$3"
17 remove_alt $name $path
18+ if grep -qw "$priority" $ad/$name; then
19+ echo "Warn: update-alternatives: $name has multiple providers with the same priority, please check $ad/$name for details"
20+ fi
21 echo "$path $priority" >> $ad/$name
22 }
23
24--
252.8.3
26
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 19a852ec62..7b01bfc346 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -10,7 +10,8 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu
10SRCREV = "3ffece9bf19a844edacc563aa092fd1fbfcffeee" 10SRCREV = "3ffece9bf19a844edacc563aa092fd1fbfcffeee"
11PV = "0.3.2+git${SRCPV}" 11PV = "0.3.2+git${SRCPV}"
12 12
13SRC_URI = "git://git.yoctoproject.org/opkg-utils" 13SRC_URI = "git://git.yoctoproject.org/opkg-utils \
14 file://0001-update-alternatives-warn-when-multiple-providers-hav.patch"
14SRC_URI_append_class-native = " file://tar_ignore_error.patch" 15SRC_URI_append_class-native = " file://tar_ignore_error.patch"
15 16
16S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"