summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-10-28 22:05:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-30 13:22:49 +0000
commit6c9e07e6507c8520176a694d7330653d43b1ba13 (patch)
tree62ea581760e248f68b530079925ed52c45337f1f
parent600cb136cd3ed474f3e890297f4768071358fc13 (diff)
downloadpoky-6c9e07e6507c8520176a694d7330653d43b1ba13.tar.gz
opkg-utils: correct priority matching in update-alternatives
(From OE-Core rev: 82baab5bd5e5ec4369eaad393feeee3132f0c087) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-correctly-match-priority.patch28
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb5
2 files changed, 31 insertions, 2 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-correctly-match-priority.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-correctly-match-priority.patch
new file mode 100644
index 0000000000..556d4ce5f5
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-correctly-match-priority.patch
@@ -0,0 +1,28 @@
1From 26206005dacd61380663bb4fd9b18178bb33665b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sat, 24 Oct 2020 21:59:27 +0200
4Subject: [PATCH] update-alternatives: correctly match priority
5
6It should always be at the end of string, otherwise something
7like "/usr/bin/python3.9-config 123" will erroneously match
8against priority 9.
9
10Upstream-Status: Submitted
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12---
13 update-alternatives | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/update-alternatives b/update-alternatives
17index 1389b3f..e0b31bf 100644
18--- a/update-alternatives
19+++ b/update-alternatives
20@@ -94,7 +94,7 @@ add_alt() {
21 local path="$2"
22 local priority="$3"
23 remove_alt $name $path
24- if grep -qw "$priority" $ad/$name; then
25+ if grep -qw "$priority"$ $ad/$name; then
26 echo "Warn: update-alternatives: $name has multiple providers with the same priority, please check $ad/$name for details"
27 fi
28 echo "$path $priority" >> $ad/$name
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb
index f9df58a295..ce299d6b63 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb
@@ -7,8 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
7 file://opkg.py;beginline=2;endline=18;md5=ffa11ff3c15eb31c6a7ceaa00cc9f986" 7 file://opkg.py;beginline=2;endline=18;md5=ffa11ff3c15eb31c6a7ceaa00cc9f986"
8PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}" 8PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
9 9
10SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ 10SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
11" 11 file://0001-update-alternatives-correctly-match-priority.patch \
12 "
12UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" 13UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
13 14
14SRC_URI[md5sum] = "7bbadb3c381f3ea935b21d3bb8cc4671" 15SRC_URI[md5sum] = "7bbadb3c381f3ea935b21d3bb8cc4671"