From: "Zhou, Li" <li.zhou@windriver.com>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg
Date: Thu, 21 May 2015 18:00:34 +0800 [thread overview]
Message-ID: <555DACC2.7090900@windriver.com> (raw)
In-Reply-To: <CA+chaQcUBprFzXEvVAu67wmoa_K20wvyM9BZn0xZ1p6zbSxkbw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3557 bytes --]
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 <li.zhou@windriver.com
> <mailto:li.zhou@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@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@windriver.com
> <mailto:li.zhou@windriver.com>>
> ---
> 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
> Openembedded-core@lists.openembedded.org
> <mailto:Openembedded-core@lists.openembedded.org>
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
--
Best Regards!
Zhou Li
Phone number: 86-10-84778511
[-- Attachment #2: Type: text/html, Size: 5897 bytes --]
next prev parent reply other threads:[~2015-05-21 10:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 1:31 [PATCH] opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg Li Zhou
2015-05-20 6:07 ` Martin Jansa
2015-05-21 10:00 ` Zhou, Li [this message]
2015-07-11 22:39 ` Richard Purdie
2015-07-31 2:55 ` Rongqing Li
2015-07-31 3:20 ` ChenQi
2015-07-31 3:20 ` Rongqing Li
-- strict thread matches above, loose matches on Subject: below --
2015-05-13 9:41 Li Zhou
2015-05-13 9:57 ` Martin Jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555DACC2.7090900@windriver.com \
--to=li.zhou@windriver.com \
--cc=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox