Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc
@ 2011-08-26  7:52 Dongxiao Xu
  2011-08-26  7:52 ` [PATCH 1/5] base-passwd: Use BPN in FILES paths Dongxiao Xu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-08-26  7:52 UTC (permalink / raw)
  To: openembedded-core

Hi Richard,

This pull request contains several multilib fixes addressing issues like
login failure, missing init/postinst/postrm scripts, missing package files, etc.

Please help to review and pull.

Chages from v1:
Add a new patch that adds renaming logic for INITSCRIPT related variables, which
fixes the issue of no response of mouse/keyboard in multilib sato image.

With those fixes, pure multilib sato image lib64-core-image-sato works fine with
my current testings.

Thanks,
Dongxiao

The following changes since commit 81aa4bfbde871af1d569b64499c34a315bf6218e:

  classes/sanity: enhance the network connectivity test (2011-08-25 08:49:12 -0700)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib dxu4/ml
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/ml

Dongxiao Xu (5):
  base-passwd: Use BPN in FILES paths
  bitbake.conf: Use BPN in FILES paths
  multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc
  multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming
    elements
  multilib.bbclass: add renaming for INITSCRIPT related variables

 meta/classes/multilib.bbclass                      |   19 +++++++++----------
 meta/conf/bitbake.conf                             |    4 ++--
 .../recipes-core/base-passwd/base-passwd_3.5.22.bb |   10 +++++-----
 3 files changed, 16 insertions(+), 17 deletions(-)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] base-passwd: Use BPN in FILES paths
  2011-08-26  7:52 [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Dongxiao Xu
@ 2011-08-26  7:52 ` Dongxiao Xu
  2011-08-26  7:52 ` [PATCH 2/5] bitbake.conf: " Dongxiao Xu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-08-26  7:52 UTC (permalink / raw)
  To: openembedded-core

Use BPN instead of PN in FILES paths.
This fixes the login issue by /etc/passwd missing in multilib images.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 .../recipes-core/base-passwd/base-passwd_3.5.22.bb |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
index a155b41..137512d 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
@@ -30,11 +30,11 @@ do_install () {
 	install -o root -g root -p -m 644 passwd.master ${D}${datadir}/base-passwd/
 	install -o root -g root -p -m 644 group.master ${D}${datadir}/base-passwd/
 
-	install -d -m 755 ${D}${docdir}/${PN}
-	install -p -m 644 debian/changelog ${D}${docdir}/${PN}/
-	gzip -9 ${D}${docdir}/${PN}/*
-	install -p -m 644 README ${D}${docdir}/${PN}/
-	install -p -m 644 debian/copyright ${D}${docdir}/${PN}/
+	install -d -m 755 ${D}${docdir}/${BPN}
+	install -p -m 644 debian/changelog ${D}${docdir}/${BPN}/
+	gzip -9 ${D}${docdir}/${BPN}/*
+	install -p -m 644 README ${D}${docdir}/${BPN}/
+	install -p -m 644 debian/copyright ${D}${docdir}/${BPN}/
 }
 
 pkg_postinst_${PN} () {
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] bitbake.conf: Use BPN in FILES paths
  2011-08-26  7:52 [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Dongxiao Xu
  2011-08-26  7:52 ` [PATCH 1/5] base-passwd: Use BPN in FILES paths Dongxiao Xu
@ 2011-08-26  7:52 ` Dongxiao Xu
  2011-08-26  7:52 ` [PATCH 3/5] multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc Dongxiao Xu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-08-26  7:52 UTC (permalink / raw)
  To: openembedded-core

Use BPN instead of PN in FILES path to support multilib.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/conf/bitbake.conf |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index b309516..2a77483 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -261,7 +261,7 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS}
             ${sysconfdir} ${sharedstatedir} ${localstatedir} \
             ${base_bindir}/* ${base_sbindir}/* \
             ${base_libdir}/*${SOLIBS} \
-            ${datadir}/${PN} ${libdir}/${PN}/* \
+            ${datadir}/${BPN} ${libdir}/${BPN}/* \
             ${datadir}/pixmaps ${datadir}/applications \
             ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
             ${libdir}/bonobo/servers"
@@ -282,7 +282,7 @@ SECTION_${PN}-staticdev = "devel"
 RDEPENDS_${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})"
 
 DOTDEBUG-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
-            ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${PN}/.debug \
+            ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${BPN}/.debug \
             ${libdir}/matchbox-panel/.debug /usr/src/debug"
 
 DEBUGFILEDIRECTORY-dbg = "/usr/lib/debug /usr/src/debug"
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc
  2011-08-26  7:52 [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Dongxiao Xu
  2011-08-26  7:52 ` [PATCH 1/5] base-passwd: Use BPN in FILES paths Dongxiao Xu
  2011-08-26  7:52 ` [PATCH 2/5] bitbake.conf: " Dongxiao Xu
@ 2011-08-26  7:52 ` Dongxiao Xu
  2011-08-26  7:52 ` [PATCH 4/5] multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming elements Dongxiao Xu
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-08-26  7:52 UTC (permalink / raw)
  To: openembedded-core

In the orignal logic, the renaming will not work for "FILES_" if defined
variables as:

PACKAGES = "${PN}"
FILES_abc = "/usr/include/abc.h"

It is because ${PN} is "lib64-abc" so it will not be contained in
pkgrename.

This commit enumerates all element in PACKAGES, getting the original
packages and multilib packages, then doing renaming for "FILES_",
"RDEPENDS_", etc. This fixes a lot of missing files and incorrect
dependencies.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/multilib.bbclass |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 571b7be..46c24e1 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -63,20 +63,18 @@ python __anonymous () {
             newvar.append(extend_name(v))
         d.setVar(varname, " ".join(newvar))
 
-    pkgs = []
-    pkgrename = {}
+    pkgs_mapping = []
     for pkg in (d.getVar("PACKAGES", True) or "").split():
         if pkg.startswith(variant):
-            pkgs.append(pkg)
+            pkgs_mapping.append([pkg.split(variant + "-")[1], pkg])
             continue
-        pkgrename[pkg] = extend_name(pkg)
-        pkgs.append(pkgrename[pkg])
+        pkgs_mapping.append([pkg, extend_name(pkg)])
 
-    if pkgrename:
-        d.setVar("PACKAGES", " ".join(pkgs))
-        for pkg in pkgrename:
-            for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY"]:
-                d.renameVar("%s_%s" % (subs, pkg), "%s_%s" % (subs, pkgrename[pkg]))
+    d.setVar("PACKAGES", " ".join([row[1] for row in pkgs_mapping]))
+
+    for pkg_mapping in pkgs_mapping:
+        for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY"]:
+            d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1]))
 
     map_dependencies("DEPENDS", d)
     for pkg in (d.getVar("PACKAGES", True).split() + [""]):
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming elements
  2011-08-26  7:52 [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Dongxiao Xu
                   ` (2 preceding siblings ...)
  2011-08-26  7:52 ` [PATCH 3/5] multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc Dongxiao Xu
@ 2011-08-26  7:52 ` Dongxiao Xu
  2011-08-26  7:52 ` [PATCH 5/5] multilib.bbclass: add renaming for INITSCRIPT related variables Dongxiao Xu
  2011-08-29 13:01 ` [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Richard Purdie
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-08-26  7:52 UTC (permalink / raw)
  To: openembedded-core

Add "pkg_postinst" and "pkg_postrm" as renaming elements, which fixes
missing post install/rm scripts in target image.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/multilib.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 46c24e1..5976d5d 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -73,7 +73,7 @@ python __anonymous () {
     d.setVar("PACKAGES", " ".join([row[1] for row in pkgs_mapping]))
 
     for pkg_mapping in pkgs_mapping:
-        for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY"]:
+        for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY", "pkg_postinst", "pkg_postrm"]:
             d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1]))
 
     map_dependencies("DEPENDS", d)
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] multilib.bbclass: add renaming for INITSCRIPT related variables
  2011-08-26  7:52 [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Dongxiao Xu
                   ` (3 preceding siblings ...)
  2011-08-26  7:52 ` [PATCH 4/5] multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming elements Dongxiao Xu
@ 2011-08-26  7:52 ` Dongxiao Xu
  2011-08-29 13:01 ` [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Richard Purdie
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-08-26  7:52 UTC (permalink / raw)
  To: openembedded-core

Initscripts are missing in target image in multilib case. This commit
adds the renaming logic for the related variables in multilib.bbclass.

This fixes the no response of mouse/keyboard in target system due to
the missing of udev startup script.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/multilib.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 5976d5d..286b806 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -73,7 +73,7 @@ python __anonymous () {
     d.setVar("PACKAGES", " ".join([row[1] for row in pkgs_mapping]))
 
     for pkg_mapping in pkgs_mapping:
-        for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY", "pkg_postinst", "pkg_postrm"]:
+        for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY", "pkg_postinst", "pkg_postrm", "INITSCRIPT_NAME", "INITSCRIPT_PARAMS"]:
             d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1]))
 
     map_dependencies("DEPENDS", d)
@@ -89,4 +89,5 @@ python __anonymous () {
     map_variable("PROVIDES", d)
     map_variable("PACKAGES_DYNAMIC", d)
     map_variable("PACKAGE_INSTALL", d)
+    map_variable("INITSCRIPT_PACKAGES", d)
 }
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc
  2011-08-26  7:52 [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Dongxiao Xu
                   ` (4 preceding siblings ...)
  2011-08-26  7:52 ` [PATCH 5/5] multilib.bbclass: add renaming for INITSCRIPT related variables Dongxiao Xu
@ 2011-08-29 13:01 ` Richard Purdie
  5 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2011-08-29 13:01 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2011-08-26 at 15:52 +0800, Dongxiao Xu wrote:
> Hi Richard,
> 
> This pull request contains several multilib fixes addressing issues like
> login failure, missing init/postinst/postrm scripts, missing package files, etc.
> 
> Please help to review and pull.
> 
> Chages from v1:
> Add a new patch that adds renaming logic for INITSCRIPT related variables, which
> fixes the issue of no response of mouse/keyboard in multilib sato image.
> 
> With those fixes, pure multilib sato image lib64-core-image-sato works fine with
> my current testings.
> 
> Thanks,
> Dongxiao
> 
> The following changes since commit 81aa4bfbde871af1d569b64499c34a315bf6218e:
> 
>   classes/sanity: enhance the network connectivity test (2011-08-25 08:49:12 -0700)
> 
> are available in the git repository at:
>   git://git.pokylinux.org/poky-contrib dxu4/ml
>   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/ml
> 
> Dongxiao Xu (5):
>   base-passwd: Use BPN in FILES paths
>   bitbake.conf: Use BPN in FILES paths
>   multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc
>   multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming
>     elements
>   multilib.bbclass: add renaming for INITSCRIPT related variables

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-29 13:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-26  7:52 [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Dongxiao Xu
2011-08-26  7:52 ` [PATCH 1/5] base-passwd: Use BPN in FILES paths Dongxiao Xu
2011-08-26  7:52 ` [PATCH 2/5] bitbake.conf: " Dongxiao Xu
2011-08-26  7:52 ` [PATCH 3/5] multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc Dongxiao Xu
2011-08-26  7:52 ` [PATCH 4/5] multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming elements Dongxiao Xu
2011-08-26  7:52 ` [PATCH 5/5] multilib.bbclass: add renaming for INITSCRIPT related variables Dongxiao Xu
2011-08-29 13:01 ` [PATCH 0/5 v2][PULL] multilib: various fixes related with login, postinst, etc Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox