aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-avoid-double-slashes.patch
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-11-21 03:44:24 -0500
committerChen Qi <Qi.Chen@windriver.com>2014-11-21 16:47:18 +0800
commit9961c270f19bef3da7ca624737d7526bebbc7f0d (patch)
treea9aad455a6cdf2d27d28dedaefb8e85741001bd2 /meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-avoid-double-slashes.patch
parent4a888b2ab61662c7f749b5d1e64af92ed613d8eb (diff)
downloadopenembedded-core-contrib-9961c270f19bef3da7ca624737d7526bebbc7f0d.tar.gz
opkg-utils: fix double slash problem in update-alternativesChenQi/update-alternatives-double-slash
When using update-alternatives, we would get output like the following: update-alternatives: Linking //usr/bin/sh to /usr/bin/bash What we really want is: update-alternatives: Linking /usr/bin/sh to /usr/bin/bash This patch fixes the above problem. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-avoid-double-slashes.patch')
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-avoid-double-slashes.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-avoid-double-slashes.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-avoid-double-slashes.patch
new file mode 100644
index 0000000000..a63b26b4e5
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-avoid-double-slashes.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+Subject: update-alternatives: avoid double slashes
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ update-alternatives | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/update-alternatives b/update-alternatives
+index 8916cbd..ca01d5d 100644
+--- a/update-alternatives
++++ b/update-alternatives
+@@ -97,7 +97,7 @@ find_best_alt() {
+ [ $# -lt 1 ] && return 1
+ [ ! -f $ad/$name ] && return 0
+
+- link=$OPKG_OFFLINE_ROOT/`head -n 1 $ad/$name`
++ link=$OPKG_OFFLINE_ROOT`head -n 1 $ad/$name`
+
+ prio=`sed -ne "1!p" $ad/$name | sed -e "s/\(.*\) \(.*\)/\2 \1/g" | sort -nr | head -n 1 | sed 's/ [^ ]*$//'`
+ if [ -z "$prio" ]; then
+--
+1.7.9.5
+