Skip to contentSkip to conversation

opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg

PATCH In review Li Zhou 2 participants 2 messages May 13, 2015

lore
Share & tools
lore

Li Zhou

author
#0 lore raw

PATCH 1/1 opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg

When update-alternatives is moved from opkg to opkg-utils, a line in the file is changed
from <ad="$OPKG_OFFLINE_ROOT@opkglibdir@/opkg/alternatives"> to <ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives">.
But opkglibdir doesn't equal to "/usr/lib" here, but equal to "/var/lib"
in oe-core build by configuring --with-opkglibdir.
opkg-utils can't get the var value in opkg, so here change back the directory in update-alternatives only.

---
 ...Change-alternatives-lib-path-from-usr-lib.patch |   36 ++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    4 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch
meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch new file +36 -0
new file mode 100644
index 0000000..60d2a1f
@@ -0,0 +1,36 @@
+From 5ca5f2f4a6b1bd82a1349542f4541c017cb5c132 Mon Sep 17 00:00:00 2001
+From: Li Zhou <[email protected]>
+Date: Wed, 13 May 2015 15:12:10 +0800
+Subject: [PATCH] opkg-utils: Change alternatives lib path from /usr/lib/opkg
+ to /var/lib/opkg
+
+When update-alternatives is moved from opkg to opkg-utils, a line in
+the file is changed
+from <ad="$OPKG_OFFLINE_ROOT@opkglibdir@/opkg/alternatives">
+to <ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives">.
+But opkglibdir doesn't equal to "/usr/lib" here, but equal to "/var/lib"
+ in oe-core build by configuring --with-opkglibdir.
+opkg-utils can't get the var value in opkg, so here change back the
+directory in update-alternatives only.
+Upstream-Status: Inappropriate [It is related with oe-core configuration.]
+Signed-off-by: Li Zhou <[email protected]>
+---
+ update-alternatives |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/update-alternatives b/update-alternatives
+index c332309..b08ecc0 100644
+--- a/update-alternatives
++++ b/update-alternatives
+@@ -21,7 +21,7 @@
+ set -e
+ 
+ # admin dir
+-ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives"
++ad="$OPKG_OFFLINE_ROOT/var/lib/opkg/alternatives"
+ 
+ usage() {
+ 	echo "update-alternatives: $*
+-- 
+1.7.9.5
+
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +3 -1
index 2800a5d..68d9a19 100644
@@ -10,7 +10,9 @@ PROVIDES += "virtual/update-alternatives"
 SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
 PV = "0.1.8+git${SRCPV}"
 
-SRC_URI = "git://git.yoctoproject.org/opkg-utils"
+SRC_URI = "git://git.yoctoproject.org/opkg-utils \
+           file://0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch \
+"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
1.7.9.5
#1 lore raw

Please make it respect the variable used in opkg.

Quoted 90 lines · Li Zhou

When update-alternatives is moved from opkg to opkg-utils, a line in the file is changed
from <ad="$OPKG_OFFLINE_ROOT@opkglibdir@/opkg/alternatives"> to <ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives">.
But opkglibdir doesn't equal to "/usr/lib" here, but equal to "/var/lib"
in oe-core build by configuring --with-opkglibdir.
opkg-utils can't get the var value in opkg, so here change back the directory in update-alternatives only.

---
 ...Change-alternatives-lib-path-from-usr-lib.patch |   36
++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    4 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644

meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch

diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch new file mode 100644
index 0000000..60d2a1f
--- /dev/null
+++
b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch

meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch new file +4 -0
@@ -0,0 +1,36 @@
+From 5ca5f2f4a6b1bd82a1349542f4541c017cb5c132 Mon Sep 17 00:00:00 2001
+From: Li Zhou <[email protected]>
+Date: Wed, 13 May 2015 15:12:10 +0800
+Subject: [PATCH] opkg-utils: Change alternatives lib path from

/usr/lib/opkg
+ to /var/lib/opkg

meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch new file +31 -0
+
+When update-alternatives is moved from opkg to opkg-utils, a line in
+the file is changed
+from <ad="$OPKG_OFFLINE_ROOT@opkglibdir@/opkg/alternatives">
+to <ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives">.
+But opkglibdir doesn't equal to "/usr/lib" here, but equal to "/var/lib"
+ in oe-core build by configuring --with-opkglibdir.
+opkg-utils can't get the var value in opkg, so here change back the
+directory in update-alternatives only.
+Upstream-Status: Inappropriate [It is related with oe-core configuration.]
+Signed-off-by: Li Zhou <[email protected]>
+---
+ update-alternatives |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/update-alternatives b/update-alternatives
+index c332309..b08ecc0 100644
+--- a/update-alternatives
++++ b/update-alternatives
+@@ -21,7 +21,7 @@
+ set -e
+
+ # admin dir
+-ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives"
++ad="$OPKG_OFFLINE_ROOT/var/lib/opkg/alternatives"
+
+ usage() {
+       echo "update-alternatives: $*
+--
+1.7.9.5
+
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +3 -2
index 2800a5d..68d9a19 100644
@@ -10,7 +10,9 @@ PROVIDES += "virtual/update-alternatives"
 SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
 PV = "0.1.8+git${SRCPV}"
 
-SRC_URI = "git://git.yoctoproject.org/opkg-utils"
+SRC_URI = "git://git.yoctoproject.org/opkg-utils \
+
 file://0001-opkg-utils-Change-alternatives-lib-path-from-usr-lib.patch \
+"
 
 S = "${WORKDIR}/git"
 
--

1.7.9.5

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core