[OE-core] [PATCH] opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg

Martin Jansa martin.jansa at gmail.com
Wed May 13 09:57:21 UTC 2015


Please make it respect the variable used in opkg.

On Wed, May 13, 2015 at 11:41 AM, Li Zhou <li.zhou at windriver.com> wrote:

> When update-alternatives is moved from opkg to opkg-utils, a line in
> the file is changed
> from <ad="$OPKG_OFFLINE_ROOT at 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.
>
> Signed-off-by: Li Zhou <li.zhou at windriver.com>
> ---
>  ...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
> @@ -0,0 +1,36 @@
> +From 5ca5f2f4a6b1bd82a1349542f4541c017cb5c132 Mon Sep 17 00:00:00 2001
> +From: Li Zhou <li.zhou at windriver.com>
> +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 at 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 <li.zhou at windriver.com>
> +---
> + 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
> +
> diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> index 2800a5d..68d9a19 100644
> --- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> @@ -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
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150513/724548c4/attachment-0002.html>


More information about the Openembedded-core mailing list