Hi, Martin:
I have tried to use <opkglibdir = "${localstatedir}/lib">, but opkg-utils is built for both native and target. localstatedir will get different value in the two cases. It causes that update-alternative for native can't get the right path. I can't find a proper variable to do this by now. Do you have any suggestion? Also, it's not a good way. But in poky/meta/recipes-devtools/installer/adt-installer/scripts/data_define, we could also see like this: OPKG_LIBDIR="/var/lib"

You mention <This also breaks all upgrade paths>, and could you give me an example for it? I'm not quite clear about the history you mentioned, and could you give an detail about this? Does this issue still exist on current version? As my git log say: the old version oe-core get the directory as /var/lib/opkg, while the new version get the directory as /usr/lib/opkg. This cause issues in the users' place. That is why I do this change.
        Thank you.

Zhou Li

On 05/20/2015 02:07 PM, Martin Jansa wrote:
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 <[email protected] <mailto:[email protected]>> wrote:

    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.

    Signed-off-by: Li Zhou <[email protected]
    <mailto:[email protected]>>
    ---
     meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
    <http://opkg-utils_git.bb> |    3 +++
     1 file changed, 3 insertions(+)

    diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
    <http://opkg-utils_git.bb>
    b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
    <http://opkg-utils_git.bb>
    index 2800a5d..fc12d91 100644
    --- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
    <http://opkg-utils_git.bb>
    +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
    <http://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
    [email protected]
    <mailto:[email protected]>
    http://lists.openembedded.org/mailman/listinfo/openembedded-core



--
Best Regards!
Zhou Li
Phone number: 86-10-84778511

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

Reply via email to