patches to fix deb packaging: bug 1070
cover patches to fix deb packaging: bug 1070
The DEB packaging for core-image-sato-sdk(previously called poky-image-sdk) and meta-toolchain-gmae(previously called meta-toolchain-sdk) has been broken for quite a long period of time -- at least it was broken in Oct 2010 (I didn't try to test older commits).
The patches try to improve the situation.
With the patches, core-image-sato-sdk for qemu{x86, x86-64, ppc, mips} can build fine, but qemuarm still has a do_rootfs issue:
| The following packages have unmet dependencies:
| task-base-extended: Depends: task-base but it is not going to be installed
And, meta-toolchain-gmae is still broken. The error is:
| + apt-get install task-sdk-host-nativesdk --force-yes --allow-unauthenticated | Reading package lists... | Building dependency tree... | Reading state information... | E: Couldn't find package task-sdk-host-nativesdk
I'm working on the left issues.
Does anybody know if OE has the similar issue or not?
Any comment/suggestions for the patch and left isseus are appreciated.
Thanks!
-- Dexuan
The following changes since commit 41b7c955cfdc7b4d5c667c8a8742237d5edaca4f:
icu-3.6: fix building with big make -j (2011-09-05 20:38:50 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dcui/distro
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/distro
Dexuan Cui (5):
populate_sdk_deb.bbclass: add the missing parameter - for tar package_deb.bbclass: put the stderr into log.do_xxx-attemptonly.xxx dpkg, dpkg-native: fix DEPENDS, RDEPENDS and pkg_postinst_dpkg
opkg: it should Rdepend on update-alternatives-cworth default-providers.inc: define update-alternatives and -native
properly
meta/classes/package_deb.bbclass | 2 +- meta/classes/populate_sdk_deb.bbclass | 2 +- meta/conf/distro/include/default-providers.inc | 5 ++--- meta/recipes-devtools/dpkg/dpkg.inc | 23 ++++++++++------------- meta/recipes-devtools/opkg/opkg_0.1.8.bb | 4 ++-- meta/recipes-devtools/opkg/opkg_svn.bb | 4 ++-- 6 files changed, 18 insertions(+), 22 deletions(-)
Signature · 1 line
1.7.6
PATCH 5/5 default-providers.inc: define update-alternatives and -native properly
For DEB packaging, we should use the -dpkg versions; For IPK packaging, we should use the -cworth and opkg versions.
--- meta/conf/distro/include/default-providers.inc | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
meta/conf/distro/include/default-providers.inc +2 -3
@@ -6,15 +6,14 @@ PREFERRED_PROVIDER_virtual/db-native ?= "db-native" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86" PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xf86-dri-lite" PREFERRED_PROVIDER_virtual/libgl ?= "mesa-xlib" -PREFERRED_PROVIDER_virtual/update-alternatives ?= "update-alternatives-cworth" -PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native" +PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "${@base_conditional('IMAGE_PKGTYPE', 'deb', 'update-alternatives-dpkg-native', 'opkg-native', d)}" PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim" PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel" # # Default virtual runtime providers # -VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-cworth" +VIRTUAL-RUNTIME_update-alternatives ?= "${@base_conditional('IMAGE_PKGTYPE', 'deb', 'update-alternatives-dpkg', 'update-alternatives-cworth', d)}" # # Default recipe providers
Signature · 1 line
1.7.6
PATCH 2/5 package_deb.bbclass: put the stderr into log.do_xxx-attemptonly.xxx
In reply to Dexuan CuiCurrently the stderr msgs go into log.do_rootfs and can cause a fatal failure in "log_check rootfs".
However, the err msg could be spurious since we *only attempt* to install the the packages, which may not exist actually. E.g., without this patch, we can get a fatal ERROR due to
E: Couldn't find package task-core-tools-dev.
--- meta/classes/package_deb.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/package_deb.bbclass +1 -1
@@ -176,7 +176,7 @@ package_install_internal_deb () { rm -f ${WORKDIR}/temp/log.do_${task}-attemptonly.${PID} if [ ! -z "${package_attemptonly}" ]; then for i in ${package_attemptonly}; do - apt-get install $i --force-yes --allow-unauthenticated >> ${WORKDIR}/temp/log.do_${task}-attemptonly.${PID} || true + apt-get install $i --force-yes --allow-unauthenticated >> ${WORKDIR}/temp/log.do_${task}-attemptonly.${PID} 2>&1 || true done fi
Signature · 1 line
1.7.6
PATCH 1/5 populate_sdk_deb.bbclass: add the missing parameter - for tar
In reply to Dexuan Cui--- meta/classes/populate_sdk_deb.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/populate_sdk_deb.bbclass +1 -1
@@ -6,7 +6,7 @@ populate_sdk_post_deb () { local target_rootfs=$1 - tar -cf -C ${STAGING_ETCDIR_NATIVE} -ps apt | tar -xf - -C ${target_rootfs}/etc + tar -cf - -C ${STAGING_ETCDIR_NATIVE} -ps apt | tar -xf - -C ${target_rootfs}/etc } fakeroot populate_sdk_deb () {
Signature · 1 line
1.7.6
PATCH 3/5 dpkg, dpkg-native: fix DEPENDS, RDEPENDS and pkg_postinst_dpkg
In reply to Dexuan Cuidpkg-native should depend on update-alternatives-dpkg-native rather than opkg-native.
dpkg should Rdepend on update-alternatives-dpkg rather than update-alternatives-cworth.
The pkg_postinst_dpkg seems buggy, e.g., for dpkg-native, ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d doesn't exist. I think OE's version(do_install_prepend) at
http://git.openembedded.org/cgit.cgi/openembedded/tree/recipes/dpkg/dpkg.inc
is corrent. So let's change to OE's version.
--- meta/recipes-devtools/dpkg/dpkg.inc | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-)
meta/recipes-devtools/dpkg/dpkg.inc +10 -13
@@ -2,14 +2,14 @@ DESCRIPTION = "Package maintenance system for Debian." LICENSE = "GPL" SECTION = "base" -INC_PR = "r4" +INC_PR = "r5" SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2 \ file://ignore_extra_fields.patch" DEPENDS = "zlib bzip2 perl" -DEPENDS_virtclass-native = "bzip2-native zlib-native virtual/update-alternatives-native gettext-native perl-native-runtime" -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}" +DEPENDS_virtclass-native = "bzip2-native zlib-native update-alternatives-dpkg-native gettext-native perl-native-runtime" +RDEPENDS_${PN} = "update-alternatives-dpkg" RDEPENDS_${PN}_virtclass-native = "" S = "${WORKDIR}/${BPN}-${PV}"
@@ -20,17 +20,14 @@ inherit autotools gettext perlnative DPKG_INIT_POSITION = "98" -pkg_postinst_dpkg () { -#!/bin/sh -if [ "x$D" != "x" ]; then - install -d $D/${sysconfdir}/rcS.d +do_install_prepend () { + install -d ${D}/${sysconfdir}/rcS.d # this happens at S98 where our good 'ole packages script used to run - echo -e "#!/bin/sh - dpkg --configure -a - rm -f /${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure -" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure - chmod 0755 $D/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure -fi + printf "#!/bin/sh +dpkg --configure -a +rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure +" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure + chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure } do_configure () {
Signature · 1 line
1.7.6
PATCH 4/5 opkg: it should Rdepend on update-alternatives-cworth
In reply to Dexuan CuiVIRTUAL-RUNTIME_update-alternatives could be
update-alternatives-cworth or
update-alternatives-dpkg.
But opkg can only Rdepend on the former.
--- meta/recipes-devtools/opkg/opkg_0.1.8.bb | 4 ++-- meta/recipes-devtools/opkg/opkg_svn.bb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-devtools/opkg/opkg_0.1.8.bb +2 -2
@@ -3,7 +3,7 @@ require opkg.inc PROVIDES += "virtual/update-alternatives" RPROVIDES_update-alternatives-cworth += "update-alternatives" RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg" -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base" +RDEPENDS_${PN} = "update-alternatives-cworth opkg-config-base" RDEPENDS_${PN}_virtclass-native = "" RDEPENDS_${PN}_virtclass-nativesdk = "" PACKAGE_ARCH_update-alternatives-cworth = "all"
@@ -13,7 +13,7 @@ SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \ file://headerfix.patch \ " -PR = "r4" +PR = "r5" PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}"
meta/recipes-devtools/opkg/opkg_svn.bb +2 -2
@@ -3,7 +3,7 @@ require opkg.inc PROVIDES += "virtual/update-alternatives" RPROVIDES_update-alternatives-cworth += "update-alternatives" RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg" -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base" +RDEPENDS_${PN} = "update-alternatives-cworth opkg-config-base" RDEPENDS_${PN}_virtclass-native = "" RDEPENDS_${PN}_virtclass-nativesdk = "" PACKAGE_ARCH_update-alternatives-cworth = "all"
@@ -17,7 +17,7 @@ S = "${WORKDIR}/trunk" SRCREV = "625" PV = "0.1.8+svnr${SRCPV}" -PR = "r2" +PR = "r3" PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}"
Signature · 1 line
1.7.6
Quoted 44 lines · Dexuan Cui
The DEB packaging for core-image-sato-sdk(previously called poky-image-sdk) and meta-toolchain-gmae(previously called meta-toolchain-sdk) has been broken for quite a long period of time -- at least it was broken in Oct 2010 (I didn't try to test older commits).
The patches try to improve the situation.
With the patches, core-image-sato-sdk for qemu{x86, x86-64, ppc, mips} can build fine, but qemuarm still has a
do_rootfsissue:
| The following packages have unmet dependencies:
| task-base-extended: Depends: task-base but it is not going to be installedAnd, meta-toolchain-gmae is still broken. The error is:
| + apt-get install task-sdk-host-nativesdk --force-yes --allow-unauthenticated | Reading package lists... | Building dependency tree... | Reading state information... | E: Couldn't find package task-sdk-host-nativesdkI'm working on the left issues.
Does anybody know if OE has the similar issue or not?
Any comment/suggestions for the patch and left isseus are appreciated.Thanks!
-- Dexuan
The following changes since commit
41b7c955cfdc7b4d5c667c8a8742237d5edaca4f:icu-3.6: fix building with big make -j (2011-09-05 20:38:50 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contribdcui/distro
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/distroDexuan Cui (5):
populate_sdk_deb.bbclass: add the missing parameter - for tar package_deb.bbclass: put the stderr into log.do_xxx-attemptonly.xxx dpkg, dpkg-native: fix DEPENDS, RDEPENDS andpkg_postinst_dpkg
opkg: it should Rdepend on update-alternatives-cworth default-providers.inc: define update-alternatives and -native
properly
Quoted 3 lines
meta/classes/package_deb.bbclass | 2 +- meta/classes/populate_sdk_deb.bbclass | 2 +- meta/conf/distro/include/default-providers.inc | 5 ++---
Dexuan,
It's possible that one of your patches is causing this Multiple .bb files now. Did you test with multiple PACKAGE_CLASSES set?
ERROR: Multiple .bb files are due to be built which each provide virtual/update-alternatives-native (virtual:native:/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/meta/recipes-devtools/opkg/opkg_svn.bb virtual:native:/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/meta/recipes-devtools/update-alternatives/update-alternatives-dpkg_1.16.0.3.bb).
This usually means one provides something the other doesn't and should.
Thanks
Sau!
Quoted 5 lines
meta/recipes-devtools/dpkg/dpkg.inc | 23 ++++++++++------------- meta/recipes-devtools/opkg/opkg_0.1.8.bb | 4 ++-- meta/recipes-devtools/opkg/opkg_svn.bb | 4 ++-- 6 files changed, 18 insertions(+), 22 deletions(-)
Saul Wold wrote on 2011-09-07:
Quoted 13 lines
It's possible that one of your patches is causing this Multiple .bb files now. Did you test with multiple
PACKAGE_CLASSESset?ERROR: Multiple .bb files are due to be built which each provide virtual/update-alternatives-native (virtual:native:/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nigh tly- ppc/build/meta/recipes-devtools/opkg/opkg_svn.bb virtual:native:/srv/home/pokybuild/yocto-autobuilder/yocto-slave/night ly-p pc/build/meta/recipes-devtools/update-alternatives/update-alternatives -dp kg_1.16.0.3.bb).
This usually means one provides something the other doesn't and should.
Thanks
Hmmm, sorry! I missed this test...
Actually at the beginning I did do this test and knew this multiple provider issue, but later I forgot it and only focused on tests with 1 PACKAGE_CLASSES set... I'm try to fix this asap.
So, please hold patch 3, 4 and 5. Patch 1 and 2 are fixing obvious issues and I think we can apply them.
Thanks,
-- Dexuan
Quoted 44 lines · Dexuan Cui
The DEB packaging for core-image-sato-sdk(previously called poky-image-sdk) and meta-toolchain-gmae(previously called meta-toolchain-sdk) has been broken for quite a long period of time -- at least it was broken in Oct 2010 (I didn't try to test older commits).
The patches try to improve the situation.
With the patches, core-image-sato-sdk for qemu{x86, x86-64, ppc, mips} can build fine, but qemuarm still has a
do_rootfsissue:
| The following packages have unmet dependencies:
| task-base-extended: Depends: task-base but it is not going to be installedAnd, meta-toolchain-gmae is still broken. The error is:
| + apt-get install task-sdk-host-nativesdk --force-yes --allow-unauthenticated | Reading package lists... | Building dependency tree... | Reading state information... | E: Couldn't find package task-sdk-host-nativesdkI'm working on the left issues.
Does anybody know if OE has the similar issue or not?
Any comment/suggestions for the patch and left isseus are appreciated.Thanks!
-- Dexuan
The following changes since commit
41b7c955cfdc7b4d5c667c8a8742237d5edaca4f:icu-3.6: fix building with big make -j (2011-09-05 20:38:50 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contribdcui/distro
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/distroDexuan Cui (5):
populate_sdk_deb.bbclass: add the missing parameter - for tar package_deb.bbclass: put the stderr into log.do_xxx-attemptonly.xxx dpkg, dpkg-native: fix DEPENDS, RDEPENDS andpkg_postinst_dpkg
opkg: it should Rdepend on update-alternatives-cworth default-providers.inc: define update-alternatives and -native
properly
Quoted 8 lines
meta/classes/package_deb.bbclass | 2 +- meta/classes/populate_sdk_deb.bbclass | 2 +- meta/conf/distro/include/default-providers.inc | 5 ++--- meta/recipes-devtools/dpkg/dpkg.inc | 23 ++++++++++------------- meta/recipes-devtools/opkg/opkg_0.1.8.bb | 4 ++-- meta/recipes-devtools/opkg/opkg_svn.bb | 4 ++-- 6 files changed, 18 insertions(+), 22 deletions(-)
As requested Populate SDK Deb patch and package_deb patch were merged with OE-Core, will look for respins on the others.
Thanks
Sau!