Skip to contentSkip to conversation

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

PATCH In review Li Zhou 3 participants 4 messages May 26, 2015 – Jul 10, 2015

lore
Share & tools
lore

Li Zhou

author
#0 lore raw

PATCH v3 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 define OPKGLIBDIR to set the path.

---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +3 -0
index 2800a5d..9c1c995 100644
@@ -22,8 +22,11 @@ PYTHONRDEPS_class-native = ""
 PACKAGECONFIG = "python"
 PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
 
+OPKGLIBDIR ?= "/var/lib"
+
 do_install() {
 	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+	sed -i s:/usr/lib/opkg:${OPKGLIBDIR}/opkg: ${D}${bindir}/update-alternatives
 }
 
 PACKAGES =+ "update-alternatives-opkg"
Signature · 1 line
1.7.9.5
#1 lore raw

Ping.

// Robert

Quoted 31 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 define OPKGLIBDIR to set the path.

---
  meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    3 +++
  1 file changed, 3 insertions(+)
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +3 -0
index 2800a5d..9c1c995 100644
@@ -22,8 +22,11 @@ PYTHONRDEPS_class-native = ""
  PACKAGECONFIG = "python"
  PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
 
+OPKGLIBDIR ?= "/var/lib"
+
  do_install() {
  	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+	sed -i s:/usr/lib/opkg:${OPKGLIBDIR}/opkg: ${D}${bindir}/update-alternatives
  }
 
  PACKAGES =+ "update-alternatives-opkg"
#2 lore raw
In reply to Li Zhou

ping

-R

Quoted 31 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 define OPKGLIBDIR to set the path.

---
  meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    3 +++
  1 file changed, 3 insertions(+)
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +3 -0
index 2800a5d..9c1c995 100644
@@ -22,8 +22,11 @@ PYTHONRDEPS_class-native = ""
  PACKAGECONFIG = "python"
  PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
 
+OPKGLIBDIR ?= "/var/lib"
+
  do_install() {
  	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+	sed -i s:/usr/lib/opkg:${OPKGLIBDIR}/opkg: ${D}${bindir}/update-alternatives
  }
 
  PACKAGES =+ "update-alternatives-opkg"
Signature · 2 lines
Best Reagrds,
Roy | RongQing Li
#3 lore raw

ping

-Roy

Quoted 39 lines · Rongqing Li

ping

-R

Quoted 33 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 define OPKGLIBDIR to set the path.

---
  meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    3 +++
  1 file changed, 3 insertions(+)
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +3 -0
index 2800a5d..9c1c995 100644
@@ -22,8 +22,11 @@ PYTHONRDEPS_class-native = ""
  PACKAGECONFIG = "python"
  PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
 
+OPKGLIBDIR ?= "/var/lib"
+
  do_install() {
      oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+    sed -i s:/usr/lib/opkg:${OPKGLIBDIR}/opkg:

${D}${bindir}/update-alternatives
}

PACKAGES =+ "update-alternatives-opkg"

Signature · 2 lines
Best Reagrds,
Roy | RongQing Li