package_rpm and createrepo fixes
cover package_rpm and createrepo fixes
Hi Saul,
For the error:
dbconfig.c:493: db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed.
The dbOpts is the value of _dbi_config_ or _dbi_config which are defined in tmp/sysroots/i686-linux/usr/lib/rpm/macros, I can't reproduce it in a normal build (on Ubuntu 10.10, Fedora 17 64bit, Ubuntu 12.04 64bit), the error would happen when manually remove i686-linux/usr/lib/rpm/macros, (but it should be there since the librpmdb-5.4.so is ready in a normal build).
These two patches are used for fixing other issues of createrepo.
// Robert
The following changes since commit 64f7feb5c37d06e1985c59106cf2f7cd286fd0b8:
EFI: Make installer EFI aware (2012-07-19 17:49:48 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/createrepo
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/createrepo
Robert Yang (2):
package_rpm: DEPLOY_DIR_RPM must exist before make index createrepo 0.4.11: fix the RDEPENDS
meta/classes/package_rpm.bbclass | 4 ++-- .../createrepo/createrepo_0.4.11.bb | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-)
PATCH 1/2 package_rpm: DEPLOY_DIR_RPM must exist before make index
There is a package-index.bb which will update the index, but the DEPLOY_DIR_RPM may not exist, for example, when "bitbake package-index" in a fresh build.
Only the package_rpm.bbclass needs this, the package_ipk.bbclass and package_deb.bbclass doesn't need.
[YOCTO #2753]
--- meta/classes/package_rpm.bbclass | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/package_rpm.bbclass +2 -2
@@ -22,7 +22,7 @@ RPMCONF_HOST_BASE = "${DEPLOY_DIR_RPM}/solvedb-sdk" # Update the Packages depsolver db in ${DEPLOY_DIR_RPM} # package_update_index_rpm () { - if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then + if [ ! -z "${DEPLOY_KEEP_PACKAGES}" -o ! -e "${DEPLOY_DIR_RPM}" ]; then return fi
@@ -1171,6 +1171,6 @@ do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}" do_package_write_rpm[umask] = "022" addtask package_write_rpm before do_package_write after do_package -PACKAGEINDEXES += "package_update_index_rpm; createrepo ${DEPLOY_DIR_RPM};" +PACKAGEINDEXES += "package_update_index_rpm; [ ! -e ${DEPLOY_DIR_RPM} ] || createrepo ${DEPLOY_DIR_RPM};" PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"
Signature · 1 line
1.7.1
PATCH 2/2 createrepo 0.4.11: fix the RDEPENDS
In reply to Robert YangThe libxml2-native and rpm-native should be ready before createrepo runs since it needs "import libxml2 rpm".
The target createrepo needs libxml2-python when run, but the libxml2 doesn't generate the python module (disabled). We may need to fix it or rename the recipe to createrepo-native_0.4.11.bb.
This recipe is only for the rpm backend system.
[YOCTO #2753]
--- .../createrepo/createrepo_0.4.11.bb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-support/createrepo/createrepo_0.4.11.bb +3 -1
@@ -4,7 +4,9 @@ HOMEPAGE = "http://createrepo.baseurl.org/" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" -PR = "r3" +RDEPENDS_${PN}_virtclass-native += "libxml2-native rpm-native" + +PR = "r4" SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \ file://fix-native-install.patch \
Signature · 1 line
1.7.1
Re: [PATCH 2/2] createrepo 0.4.11: fix the RDEPENDS
Quoted 21 lines · Robert Yang
The libxml2-native and rpm-native should be ready before createrepo runs since it needs "import libxml2 rpm".
The target createrepo needs libxml2-python when run, but the libxml2 doesn't generate the python module (disabled). We may need to fix it or rename the recipe to createrepo-native_0.4.11.bb.
This recipe is only for the rpm backend system.
[YOCTO #2753]
Signed-off-by Robert Yang <[email protected]>--- .../createrepo/createrepo_0.4.11.bb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)meta/recipes-support/createrepo/createrepo_0.4.11.bb +0
-0
meta/recipes-support/createrepo/createrepo_0.4.11.bb HOMEPAGE = "http://createrepo.baseurl.org/" · line 8
Quoted 6 lines
meta/recipes-support/createrepo/createrepo_0.4.11.bb +2
-1@@ -4,7 +4,9 @@ HOMEPAGE = "http://createrepo.baseurl.org/" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" -PR = "r3" +RDEPENDS_${PN}_virtclass-native += "libxml2-native rpm-native" +
This should not be required here since the package_rpm.bbclass contains a line:
PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
We might need to add libxml2-native to the PACKAGEINDEXDEPS
This was merged into OE-0Core, but the real issue turned out to be sstate across different distros.
Sau!
Quoted 5 lines
meta/recipes-support/createrepo/createrepo_0.4.11.bb +1
-0+PR = "r4" SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \ file://fix-native-install.patch \
Re: [PATCH 2/2] createrepo 0.4.11: fix the RDEPENDS
Quoted 25 lines · Saul Wold
Quoted 24 lines · Robert Yang
The libxml2-native and rpm-native should be ready before createrepo runs since it needs "import libxml2 rpm".
The target createrepo needs libxml2-python when run, but the libxml2 doesn't generate the python module (disabled). We may need to fix it or rename the recipe to createrepo-native_0.4.11.bb.
This recipe is only for the rpm backend system.
[YOCTO #2753]
Signed-off-by Robert Yang <[email protected]>--- .../createrepo/createrepo_0.4.11.bb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)meta/recipes-support/createrepo/createrepo_0.4.11.bb +0
-0@@ -4,7 +4,9 @@ HOMEPAGE = "http://createrepo.baseurl.org/" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
Quoted 8 lines
meta/recipes-support/createrepo/createrepo_0.4.11.bb HOMEPAGE = "http://createrepo.baseurl.org/" · line 8
Quoted 3 lines
meta/recipes-support/createrepo/createrepo_0.4.11.bb +2
-1-PR = "r3" +RDEPENDS_${PN}_virtclass-native += "libxml2-native rpm-native" +This should not be required here since the package_rpm.bbclass contains a line:
PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"We might need to add libxml2-native to the PACKAGEINDEXDEPS
FWIW, having correct RDEPENDS in the recipes is important so this fix is a good one regardless of whether it fixes the other issue or not.
Cheers,
Richard
Re: [PATCH 2/2] createrepo 0.4.11: fix the RDEPENDS
In reply to Saul WoldQuoted 26 lines · Saul Wold
Quoted 25 lines · Robert Yang
The libxml2-native and rpm-native should be ready before createrepo runs since it needs "import libxml2 rpm".
The target createrepo needs libxml2-python when run, but the libxml2 doesn't generate the python module (disabled). We may need to fix it or rename the recipe to createrepo-native_0.4.11.bb.
This recipe is only for the rpm backend system.
[YOCTO #2753]
Signed-off-by Robert Yang <[email protected]>--- .../createrepo/createrepo_0.4.11.bb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)meta/recipes-support/createrepo/createrepo_0.4.11.bb +0
-0@@ -4,7 +4,9 @@ HOMEPAGE = "http://createrepo.baseurl.org/" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
Quoted 8 lines
meta/recipes-support/createrepo/createrepo_0.4.11.bb HOMEPAGE = "http://createrepo.baseurl.org/" · line 8
Quoted 3 lines
meta/recipes-support/createrepo/createrepo_0.4.11.bb +2
-1-PR = "r3" +RDEPENDS_${PN}_virtclass-native += "libxml2-native rpm-native" +This should not be required here since the package_rpm.bbclass contains a line:
PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"We might need to add libxml2-native to the PACKAGEINDEXDEPS
Thanks, but we may manually run createrepo, if we just "bitbake createrepo" and manually run createrepo, it would be failed if rpm-native is not ready.
Quoted 3 lines
This was merged into OE-0Core, but the real issue turned out to be sstate across different distros.
I had tried to use sstate across different distros (ubuntu 12.04 64bit and FC 17 64 bit), there were strange errors.
// Robert
Quoted 12 lines
Sau!
Quoted 5 lines
meta/recipes-support/createrepo/createrepo_0.4.11.bb +1
-0+PR = "r4" SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \ file://fix-native-install.patch \
Saul Wold
AppliedQuoted 6 lines · Robert Yang
Hi Saul,
For the error:
dbconfig.c:493: db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed.
Quoted 9 lines
The dbOpts is the value of _dbi_config_ or
_dbi_configwhich are defined in tmp/sysroots/i686-linux/usr/lib/rpm/macros, I can't reproduce it in a normal build (on Ubuntu 10.10, Fedora 17 64bit, Ubuntu 12.04 64bit), the error would happen when manually remove i686-linux/usr/lib/rpm/macros, (but it should be there since the librpmdb-5.4.so is ready in a normal build).These two patches are used for fixing other issues of createrepo.
Turns out the real problem is that one machine was running Suse and the other Fedora and mixing the binaries via nfs and sstate was causing the real problem.
I made a note about the DEPENDS for createrepo, really should be part of package_rpm.bbclass
Quoted 19 lines
// Robert
The following changes since commit
64f7feb5c37d06e1985c59106cf2f7cd286fd0b8:EFI: Make installer EFI aware (2012-07-19 17:49:48 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contribrobert/createrepo
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/createrepoRobert Yang (2):
package_rpm:DEPLOY_DIR_RPMmust exist before make index createrepo 0.4.11: fix the RDEPENDSmeta/classes/package_rpm.bbclass | 4 ++-- .../createrepo/createrepo_0.4.11.bb | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-)
Quoted 6 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Merged into OE-Core
Thanks
Sau!