Skip to contentSkip to conversation

multilib: various fixes related with login, postinst, etc

GIT PULL New Dongxiao Xu 2 participants 7 messages Aug 26, 2011 – Aug 29, 2011

lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw

PATCH 1/5 base-passwd: Use BPN in FILES paths

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

---
 .../recipes-core/base-passwd/base-passwd_3.5.22.bb |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
meta/recipes-core/base-passwd/base-passwd_3.5.22.bb +5 -5
index a155b41..137512d 100644
@@ -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} () {
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/5 bitbake.conf: Use BPN in FILES paths

In reply to Dongxiao Xu

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

---
 meta/conf/bitbake.conf |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +2 -2
index b309516..2a77483 100644
@@ -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"
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/5 multilib.bbclass: Fix renaming logic for "FILES_", "RDEPENDS_", etc

In reply to Dongxiao Xu

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.

---
 meta/classes/multilib.bbclass |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
meta/classes/multilib.bbclass +8 -10
index 571b7be..46c24e1 100644
@@ -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() + [""]):
Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/5 multilib.bbclass: add "pkg_postinst" and "pkg_postrm" as renaming elements

In reply to Dongxiao Xu

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

---
 meta/classes/multilib.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/multilib.bbclass +1 -1
index 46c24e1..5976d5d 100644
@@ -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)
Signature · 1 line
1.7.1
#5 lore raw

PATCH 5/5 multilib.bbclass: add renaming for INITSCRIPT related variables

In reply to Dongxiao Xu

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.

---
 meta/classes/multilib.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/multilib.bbclass +2 -1
index 5976d5d..286b806 100644
@@ -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)
 }
Signature · 1 line
1.7.1
#6 lore raw
In reply to Dongxiao Xu
Quoted 25 lines · Dongxiao Xu

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

Quoted 7 lines

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