diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-10-28 22:05:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-30 13:03:27 +0000 |
commit | 82baab5bd5e5ec4369eaad393feeee3132f0c087 (patch) | |
tree | 851c2bf0b328cca9af13861c7be9928d1b68617e /meta | |
parent | 41aa60cdb1e26617e1eeac95a6ffcdd6561c539f (diff) | |
download | openembedded-core-82baab5bd5e5ec4369eaad393feeee3132f0c087.tar.gz |
opkg-utils: correct priority matching in update-alternatives
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.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-correctly-match-priority.patch | 28 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-utils_0.4.3.bb | 5 |
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 @@ +From 26206005dacd61380663bb4fd9b18178bb33665b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Sat, 24 Oct 2020 21:59:27 +0200 +Subject: [PATCH] update-alternatives: correctly match priority + +It should always be at the end of string, otherwise something +like "/usr/bin/python3.9-config 123" will erroneously match +against priority 9. + +Upstream-Status: Submitted +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + update-alternatives | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/update-alternatives b/update-alternatives +index 1389b3f..e0b31bf 100644 +--- a/update-alternatives ++++ b/update-alternatives +@@ -94,7 +94,7 @@ add_alt() { + local path="$2" + local priority="$3" + remove_alt $name $path +- if grep -qw "$priority" $ad/$name; then ++ if grep -qw "$priority"$ $ad/$name; then + echo "Warn: update-alternatives: $name has multiple providers with the same priority, please check $ad/$name for details" + fi + 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 \ file://opkg.py;beginline=2;endline=18;md5=ffa11ff3c15eb31c6a7ceaa00cc9f986" PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}" -SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ -" +SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ + file://0001-update-alternatives-correctly-match-priority.patch \ + " UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" SRC_URI[md5sum] = "7bbadb3c381f3ea935b21d3bb8cc4671" |