[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 20 06:07:59 UTC 2015
Please use the same variable with weak assignment like opkg recipes (so
that it can be easily changed from distro config).
This also breaks all upgrade paths, is it acceptable? In oe-classic days
I've created postinst script which were migrating existing
update-alternatives in the rootfs when update-alternatives-cworth was
upgraded with different path.
On Wed, May 20, 2015 at 3:31 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 define opkglibdir to
> set the path.
>
> Signed-off-by: Li Zhou <li.zhou at windriver.com>
> ---
> meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> index 2800a5d..fc12d91 100644
> --- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> @@ -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"
> --
> 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/20150520/da5eb81f/attachment-0002.html>
More information about the Openembedded-core
mailing list