Skip to contentSkip to conversation

Add PR service and integrate PKGV/PKGR from OE

PATCH In review Lianhao Lu 6 participants 28 messages May 27, 2011 – May 28, 2011

lore
Share & tools
lore

Lianhao Lu

author
#0 lore raw

cover Add PR service and integrate PKGV/PKGR from OE

This is a modification of the original patch to enable network based PR service.

The main difference between this series of patch to the original one is that this one uses the PKGR/PKGV during the package feed creation, and use EXTENDPKGV instead of EXTENDPV for package dependencies.

It also made the PR service disabled by default(by leaving the PRSERV_HOST and PRSERV_PORT commented out) and revised some function names.

The following features from the previous patch comments are not included in this series:
1) automatically launch PR service in localhost use case.
2) respect OVERIDE to allow setting PRSERV_HOST/PORT per recipe basis
3) write permission control in the PR service.
4) way to sync up local PR database witht the central server.
5) added proxy support for PR service.

I'll continue to work on some of those features. But I'd like to send this patch now to meet the schedule time window, and anyone interested can experiment and provide some comments.

Below is the excerpt from my last series of patch. ---------------BEGIN of last patch message------------------------------------ This series of 5 patches implemented the network based PR service and enabled the poky to use it during the task do_package and do_package_write_xxx. By using the network based PR service and the basichash for BB_SIGNATURE_HANDLER, the poky user may not need to bump the PR manually everytime he/she changes the recipe. The package will get automatically rebuilt and new revision number reflecting the change will be included in the package feed.

The first patch "[PATCH 1/5] Added the PR service." implemented the network based PR service on the server side. It is a XMLRPC server with the sqlite3 as the backend database. The users query an automated value from this service by giving a tuple of (version, checksum). The returned value will be used as a part of the package revision value during the package feed creation process. The following algorihtm is used so this PR service could give multiple build servers new values for the new index tuple and same values for the same index tuple:

IF the index tuple(version, checksum) is found, THEN
return the value.
ELSE
find the max value in the database with the same version. increment it and save it into the database along with the index tuple. return the incremented value.
(Note: If no matching version is found, save and return the value of 0).
ENDIF

To start the network based PR service daemon, run the following command after "sourcing" the environment file oe-init-build-env:

  bitbake-prserv --start

See bitbake-prserv --help to see a detailed description of the options.

The remaining 4 patches enable the poky to use the PR service. In order to use it, the user needs to set 2 varialbes of PRSERV_HOST and PRSERV_PORT (which specify the PR service ip address and port, default is "localhost" and "8585" respectively) in the file conf/local.conf under the building directory. Leaving these 2 variables commented out would disable the poky to use the PR service, so the poky would behave exactly like what is now. ------------------END of last patch message----------------------------------

The following changes since commit 9bccbc5fbc71b331911b558a2ba15e0a6d0046b4:
Nitin A Kamble (1):
tcmode-default: workaround for gcc 4.6.0 failure on beagleboard

are available in the git repository at:

git://git.pokylinux.org/poky-contrib llu/PR-service
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/PR-service

Lianhao Lu (11):
Added the PR service.
conf/bitbake.conf: Added variables for PR service. meta-yocto/local.conf.sample: Added PRSERV_HOST and PRSERV_PORT. classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR. classes/package_xxx.class: Use PKGE/PKGV/PKGR.
udev: use EXTENDPKGV instead of EXTENDPV.
xcb: use EXTENDPKGV instead of EXTENDPV.
xorg-proto: use EXTENDPKGV instead of EXTENDPV. xorg-util/util-macros: use EXTENDPKGV instead of EXTENDPV.
linux-libc-headers: use EXTENDPKGV instead of EXTENDPV. conf/bitbake.conf: Removed EXTENDPV and EXTENDPEVER.

 bitbake/bin/bitbake-prserv                         |   53 ++++++
 bitbake/lib/prserv/__init__.py                     |   11 +
 bitbake/lib/prserv/db.py                           |  100 ++++++++++
 bitbake/lib/prserv/serv.py                         |  198 ++++++++++++++++++++
 meta-yocto/conf/local.conf.sample                  |    5 +
 meta/classes/package.bbclass                       |   51 ++++--
 meta/classes/package_deb.bbclass                   |    8 +-
 meta/classes/package_ipk.bbclass                   |    8 +-
 meta/classes/package_rpm.bbclass                   |   14 +-
 meta/classes/package_tar.bbclass                   |    4 +-
 meta/classes/prserv.bbclass                        |   29 +++
 meta/conf/bitbake.conf                             |   23 ++-
 meta/recipes-core/udev/udev-new.inc                |    2 +-
 meta/recipes-graphics/xcb/libpthread-stubs_0.3.bb  |    2 +-
 meta/recipes-graphics/xcb/xcb-proto.inc            |    2 +-
 .../xorg-proto/xorg-proto-common.inc               |    2 +-
 .../xorg-util/util-macros_1.13.0.bb                |    2 +-
 .../linux-libc-headers/linux-libc-headers.inc      |    2 +-
 18 files changed, 473 insertions(+), 43 deletions(-)
 create mode 100755 bitbake/bin/bitbake-prserv
 create mode 100644 bitbake/lib/prserv/__init__.py
 create mode 100644 bitbake/lib/prserv/db.py
 create mode 100644 bitbake/lib/prserv/serv.py
 create mode 100644 meta/classes/prserv.bbclass
author
#1 lore raw

PATCH 1/11 Added the PR service.

Added the initial implementation of the server side PR service.

---
 bitbake/bin/bitbake-prserv     |   53 +++++++++++
 bitbake/lib/prserv/__init__.py |   11 ++
 bitbake/lib/prserv/db.py       |  100 ++++++++++++++++++++
 bitbake/lib/prserv/serv.py     |  198 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 362 insertions(+), 0 deletions(-)
 create mode 100755 bitbake/bin/bitbake-prserv
 create mode 100644 bitbake/lib/prserv/__init__.py
 create mode 100644 bitbake/lib/prserv/db.py
 create mode 100644 bitbake/lib/prserv/serv.py
bitbake/bin/bitbake-prserv new file +53 -0
new file mode 100755
index 0000000..14073ca
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+import os
+import sys,logging
+import optparse
+
+sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)),'lib'))
+
+import prserv
+import prserv.serv
+
+__version__="1.0.0"
+
+PRHOST_DEFAULT=''
+PRPORT_DEFAULT=8585
+
+def main():
+    parser = optparse.OptionParser(
+        version="Bitbake PR Service Core version %s, %%prog version %s" % (prserv.__version__, __version__),
+        usage = "%prog [options]")
+
+    parser.add_option("-f", "--file", help="database filename(default prserv.db)", action="store",
+                      dest="dbfile", type="string", default="prserv.db")
+    parser.add_option("-l", "--log", help="log filename(default prserv.log)", action="store",
+                      dest="logfile", type="string", default="prserv.log")
+    parser.add_option("--loglevel", help="logging level, i.e. CRITICAL, ERROR, WARNING, INFO, DEBUG",
+                      action = "store", type="string", dest="loglevel", default = "WARNING")
+    parser.add_option("--start", help="start daemon",
+                      action="store_true", dest="start", default="True")
+    parser.add_option("--stop", help="stop daemon",
+                      action="store_false", dest="start")
+    parser.add_option("--host", help="ip address to bind", action="store",
+                      dest="host", type="string", default=PRHOST_DEFAULT)
+    parser.add_option("--port", help="port number(default 8585)", action="store",
+                      dest="port", type="int", default=PRPORT_DEFAULT)
+
+    options, args = parser.parse_args(sys.argv)
+
+    prserv.init_logger(os.path.abspath(options.logfile),options.loglevel)
+
+    if options.start:
+        prserv.serv.start_daemon(options)
+    else:
+        prserv.serv.stop_daemon()
+
+if __name__ == "__main__":
+    try:
+        ret = main()
+    except Exception:
+        ret = 1
+        import traceback
+        traceback.print_exc(5)
+    sys.exit(ret)
+
bitbake/lib/prserv/__init__.py new file +11 -0
new file mode 100644
index 0000000..2837e13
@@ -0,0 +1,11 @@
+__version__ = "1.0.0"
+
+import os, time
+import sys,logging
+
+def init_logger(logfile, loglevel):
+    numeric_level = getattr(logging, loglevel.upper(), None)
+    if not isinstance(numeric_level, int):
+        raise ValueError('Invalid log level: %s' % loglevel)
+    logging.basicConfig(level=numeric_level, filename=logfile)
+
bitbake/lib/prserv/db.py new file +100 -0

100 lines not on this page · raw message

bitbake/lib/prserv/serv.py new file +198 -0

198 lines not on this page · raw message

Signature · 1 line
1.7.0.4
author
#2 lore raw

PATCH 2/11 conf/bitbake.conf: Added variables for PR service.

1. change BB_SIGNATURE_HANDLER from basic to basichash.

2. Added following variables for PR service:
USE_PR_SERV: flag of whether to use the network PR service
PRAUTOINX: search index for the network PR service PKGE/PKGV/PKGR: epoch, version and revision used in package feed.
EXTENDPKGV: full package version string used in package relationships.

---
 meta/conf/bitbake.conf |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)
meta/conf/bitbake.conf +19 -4
index d307385..4fcf4f6 100644
@@ -153,9 +153,18 @@ PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0
 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
 EXTENDPE = "${@['','${PE\x7d_'][bb.data.getVar('PE',d,1) > 0]}"
 EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
-EXTENDPV = "${EXTENDPEVER}${PV}-${PR}"
+EXTENDPV = "${EXTENDPEVER}${PV}-${PR}{DISTRO_PR}"
 P = "${PN}-${PV}"
 
+EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][bb.data.getVar('PRAUTO',d,1) is None]}"
+PRAUTOINX = "${PF}${DISTRO_PR}"
+
+PKGV ?= "${PV}"
+PKGR ?= "${PR}${DISTRO_PR}${EXTENDPRAUTO}"
+PKGE ?= "${@['','${PE\x7d'][bb.data.getVar('PE',d,1) > 0]}"
+EXTENDPKGEVER = "${@['','${PKGE\x7d:'][bb.data.getVar('PKGE',d,1).strip() != '']}"
+EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
+
 # Base package name
 # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
 # otherwise it is the same as PN and P
@@ -163,6 +172,11 @@ SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -nativesdk -crosssdk
 BPN = "${@base_prune_suffix(bb.data.getVar('PN', d, True), bb.data.getVar('SPECIAL_PKGSUFFIX', d, True).split(), d)}"
 BP = "${BPN}-${PV}"
 
+#
+# network based PR service
+#
+USE_PR_SERV = "${@[1,0][(bb.data.getVar('PRSERV_HOST',d,1) is None) or (bb.data.getVar('PRSERV_PORT',d,1) is None)]}"
+
 # Package info.
 
 SECTION = "base"
@@ -241,7 +255,7 @@ FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
                 ${base_libdir}/*.a ${base_libdir}/*.o"
 SECTION_${PN}-dev = "devel"
 ALLOW_EMPTY_${PN}-dev = "1"
-RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPV})"
+RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"
 
 DOTDEBUG-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
             ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${PN}/.debug \
@@ -253,7 +267,7 @@ FILES_${PN}-dbg = "${@bb.data.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][
 
 SECTION_${PN}-dbg = "devel"
 ALLOW_EMPTY_${PN}-dbg = "1"
-RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPV})"
+RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPKGV})"
 
 FILES_${PN}-locale = "${datadir}/locale"
 
@@ -650,6 +664,7 @@ PCMCIA_MANAGER ?= "pcmcia-cs"
 DEFAULT_TASK_PROVIDER ?= "task-base"
 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
 IMAGE_ROOTFS_SIZE ?= "65536"
+DISTRO_PR ?= ''
 
 # Forcefully set CACHE now so future changes to things like 
 # MACHINE don't change the path to the cache
@@ -708,7 +723,7 @@ DISTRO[unexport] = "1"
 TRANSLATED_TARGET_ARCH ??= ${TARGET_ARCH}
 
 # Setup our default hash policy
-BB_SIGNATURE_HANDLER ?= "basic"
+BB_SIGNATURE_HANDLER ?= "basichash"
 BB_HASHTASK_WHITELIST ?= "(.*-cross$|.*-native$|.*-cross-initial$|.*-cross-intermediate$|^virtual:native:.*|^virtual:nativesdk:.*)"
 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH USERNAME STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE"
 
Signature · 1 line
1.7.0.4
author
#3 lore raw

PATCH 3/11 meta-yocto/local.conf.sample: Added PRSERV_HOST and PRSERV_PORT.

In reply to Lianhao Lu

Setting PRSERV_HOST and PRSERV_PORT would trigger the poky to use remote PR network service. Leaving them unset allow the user to build image without the PR network service

---
 meta-yocto/conf/local.conf.sample |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
meta-yocto/conf/local.conf.sample +5 -0
index a9b4998..359e510 100644
@@ -216,3 +216,8 @@ NO32LIBS = "1"
 # GNOME, SCREEN, XTERM and KONSOLE
 #TERMCMD = "${KONSOLE_TERMCMD}"
 #TERMCMDRUN = "${KONSOLE_TERMCMDRUN}"
+
+
+# The network based PR service host and port
+#PRSERV_HOST = "localhost"
+#PRSERV_PORT = "8585"
Signature · 1 line
1.7.0.4
author
#4 lore raw

PATCH 4/11 classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR.

In reply to Lianhao Lu

1. Added package_get_auto_pr to PACKAGEFUNCS to get the auto incremented value(PRAUTO) from remote PR service.

2. use PKGV/PKGR for pkgdata which will be used by package_write_xxx.

3. Added supporting functions in prserv.bbclass.

---
 meta/classes/package.bbclass |   51 +++++++++++++++++++++++++++++------------
 meta/classes/prserv.bbclass  |   29 +++++++++++++++++++++++
 2 files changed, 65 insertions(+), 15 deletions(-)
 create mode 100644 meta/classes/prserv.bbclass
meta/classes/package.bbclass +36 -15
index 2c6d30c..a1b9482 100644
@@ -7,34 +7,37 @@
 #
 # There are the following default steps but PACKAGEFUNCS can be extended:
 #
-# a) perform_packagecopy - Copy D into PKGD
+# a) package_get_auto_pr - get PRAUTO from remote PR service
 #
-# b) package_do_split_locales - Split out the locale files, updates FILES and PACKAGES
+# b) perform_packagecopy - Copy D into PKGD
 #
-# c) split_and_strip_files - split the files into runtime and debug and strip them.
+# c) package_do_split_locales - Split out the locale files, updates FILES and PACKAGES
+#
+# d) split_and_strip_files - split the files into runtime and debug and strip them.
 #    Debug files include debug info split, and associated sources that end up in -dbg packages
 #
-# d) populate_packages - Split the files in PKGD into separate packages in PKGDEST/<pkgname>
+# e) populate_packages - Split the files in PKGD into separate packages in PKGDEST/<pkgname>
 #    Also triggers the binary stripping code to put files in -dbg packages.
 #
-# e) package_do_filedeps - Collect perfile run-time dependency metadata
+# f) package_do_filedeps - Collect perfile run-time dependency metadata
 #    The data is stores in FILER{PROVIDES,DEPENDS}_file_pkg variables with
 #    a list of affected files in FILER{PROVIDES,DEPENDS}FLIST_pkg
 #
-# f) package_do_shlibs - Look at the shared libraries generated and autotmatically add any 
+# g) package_do_shlibs - Look at the shared libraries generated and autotmatically add any 
 #    depenedencies found. Also stores the package name so anyone else using this library 
 #    knows which package to depend on.
 #
-# g) package_do_pkgconfig - Keep track of which packages need and provide which .pc files
+# h) package_do_pkgconfig - Keep track of which packages need and provide which .pc files
 #
-# h) read_shlibdeps - Reads the stored shlibs information into the metadata
+# i) read_shlibdeps - Reads the stored shlibs information into the metadata
 #
-# i) package_depchains - Adds automatic dependencies to -dbg and -dev packages
+# j) package_depchains - Adds automatic dependencies to -dbg and -dev packages
 #
-# j) emit_pkgdata - saves the packaging data into PKGDATA_DIR for use in later 
+# k) emit_pkgdata - saves the packaging data into PKGDATA_DIR for use in later 
 #    packaging steps
 
 inherit packagedata
+inherit prserv
 
 PKGD    = "${WORKDIR}/package"
 PKGDEST = "${WORKDIR}/packages-split"
@@ -326,6 +329,15 @@ def runtime_mapping_rename (varname, d):
 # Package functions suitable for inclusion in PACKAGEFUNCS
 #
 
+python package_get_auto_pr() {
+	if d.getVar('USE_PR_SERV', True):
+		auto_pr=prserv_get_pr_auto(d)
+		if auto_pr is None:
+			bb.fatal("Can NOT get auto PR revision from remote PR service")
+			return
+		d.setVar('PRAUTO',str(auto_pr))
+}
+
 python package_do_split_locales() {
 	if (bb.data.getVar('PACKAGE_NO_LOCALE', d, True) == '1'):
 		bb.debug(1, "package requested not splitting locales")
@@ -773,6 +785,8 @@ python emit_pkgdata() {
 		write_if_exists(sf, pkg, 'PN')
 		write_if_exists(sf, pkg, 'PV')
 		write_if_exists(sf, pkg, 'PR')
+		write_if_exists(sf, pkg, 'PKGV')
+		write_if_exists(sf, pkg, 'PKGR')
 		write_if_exists(sf, pkg, 'DESCRIPTION')
 		write_if_exists(sf, pkg, 'SUMMARY')
 		write_if_exists(sf, pkg, 'RDEPENDS')
@@ -911,9 +925,9 @@ python package_do_shlibs() {
 
 	workdir = bb.data.getVar('WORKDIR', d, True)
 
-	ver = bb.data.getVar('PV', d, True)
+	ver = bb.data.getVar('PKGV', d, True)
 	if not ver:
-		bb.error("PV not defined")
+		bb.error("PKGV not defined")
 		return
 
 	pkgdest = bb.data.getVar('PKGDEST', d, True)
@@ -1025,6 +1039,12 @@ python package_do_shlibs() {
 		needs_ldconfig = False
 		bb.debug(2, "calculating shlib provides for %s" % pkg)
 
+		pkgver = bb.data.getVar('PKGV_' + pkg, d, True)
+		if not pkgver:
+			pkgver = bb.data.getVar('PV_' + pkg, d, True)
+		if not pkgver:
+			pkgver = ver
+
 		needed[pkg] = []
 		sonames = list()
 		renames = list()
@@ -1048,10 +1068,10 @@ python package_do_shlibs() {
 			fd = open(shlibs_file, 'w')
 			for s in sonames:
 				fd.write(s + '\n')
-				shlib_provider[s] = (pkg, ver)
+				shlib_provider[s] = (pkg, pkgver)
 			fd.close()
 			fd = open(shver_file, 'w')
-			fd.write(ver + '\n')
+			fd.write(pkgver + '\n')
 			fd.close()
 		if needs_ldconfig and use_ldconfig:
 			bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
@@ -1348,7 +1368,8 @@ python package_depchains() {
 }
 
 PACKAGE_PREPROCESS_FUNCS ?= ""
-PACKAGEFUNCS ?= "perform_packagecopy \
+PACKAGEFUNCS ?= "package_get_auto_pr \	
+                perform_packagecopy \
                 ${PACKAGE_PREPROCESS_FUNCS} \
 		package_do_split_locales \
 		split_and_strip_files \
meta/classes/prserv.bbclass new file +29 -0
new file mode 100644
index 0000000..de46ff6
@@ -0,0 +1,29 @@
+def prserv_make_conn(d):
+    import prserv.serv
+    host=d.getVar("PRSERV_HOST",True)
+    port=d.getVar("PRSERV_PORT",True)
+    try:
+        conn=None
+        conn=prserv.serv.PRServerConnection(host,int(port))
+        d.setVar("__PRSERV_CONN",conn)
+    except Exception, exc:
+        bb.fatal("Connecting to PR service %s:%s failed: %s" % (host, port, str(exc)))
+
+    return conn
+
+def prserv_get_pr_auto(d):
+    if not d.getVar('USE_PR_SERV', True):
+        bb.warn("Not using network based PR service")
+        return None
+
+    conn=d.getVar("__PRSERV_CONN", True)
+    if conn is None:
+        conn=prserv_make_conn(d)
+        if conn is None:
+            return None
+
+    version=d.getVar("PF", True)
+    checksum=d.getVar("BB_TASKHASH", True)
+    auto_rev=conn.getPR(version,checksum)
+    bb.debug(1,"prserv_get_pr_auto: version: %s checksum: %s result %d" % (version, checksum, auto_rev))
+    return auto_rev
Signature · 1 line
1.7.0.4
author
#5 lore raw

PATCH 5/11 classes/package_xxx.class: Use PKGE/PKGV/PKGR.

In reply to Lianhao Lu

Use PKGE/PKGV/PKGR to build various package feed in tasks of pacakge_write_xxx.

---
 meta/classes/package_deb.bbclass |    8 ++++----
 meta/classes/package_ipk.bbclass |    8 ++++----
 meta/classes/package_rpm.bbclass |   14 +++++++-------
 meta/classes/package_tar.bbclass |    4 ++--
 4 files changed, 17 insertions(+), 17 deletions(-)
meta/classes/package_deb.bbclass +4 -4
index 000d9ee..fb502cb 100644
@@ -272,7 +272,7 @@ python do_package_deb () {
         except ValueError:
             pass
         if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
-            bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, True), bb.data.getVar('PR', localdata, True)))
+            bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PKGV', localdata, True), bb.data.getVar('PKGR', localdata, True)))
             bb.utils.unlockfile(lf)
             continue
 
@@ -288,11 +288,11 @@ python do_package_deb () {
             raise bb.build.FuncFailed("unable to open control file for writing.")
 
         fields = []
-        pe = bb.data.getVar('PE', d, True)
+        pe = bb.data.getVar('PKGE', d, True)
         if pe and int(pe) > 0:
-            fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
+            fields.append(["Version: %s:%s-%s\n", ['PKGE', 'PKGV', 'PKGR']])
         else:
-            fields.append(["Version: %s-%s\n", ['PV', 'PR']])
+            fields.append(["Version: %s-%s\n", ['PKGV', 'PKGR']])
         fields.append(["Description: %s\n", ['DESCRIPTION']])
         fields.append(["Section: %s\n", ['SECTION']])
         fields.append(["Priority: %s\n", ['PRIORITY']])
meta/classes/package_ipk.bbclass +4 -4
index a3dfc73..4317028 100644
@@ -241,7 +241,7 @@ python do_package_ipk () {
 		except ValueError:
 			pass
 		if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
-			bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1)))
+			bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PKGV', localdata, 1), bb.data.getVar('PKGR', localdata, 1)))
 			bb.utils.unlockfile(lf)
 			continue
 
@@ -254,11 +254,11 @@ python do_package_ipk () {
 			raise bb.build.FuncFailed("unable to open control file for writing.")
 
 		fields = []
-		pe = bb.data.getVar('PE', d, 1)
+		pe = bb.data.getVar('PKGE', d, 1)
 		if pe and int(pe) > 0:
-			fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
+			fields.append(["Version: %s:%s-%s\n", ['PKGE', 'PKGV', 'PKGR']])
 		else:
-			fields.append(["Version: %s-%s\n", ['PV', 'PR']])
+			fields.append(["Version: %s-%s\n", ['PKGV', 'PKGR']])
 		fields.append(["Description: %s\n", ['DESCRIPTION']])
 		fields.append(["Section: %s\n", ['SECTION']])
 		fields.append(["Priority: %s\n", ['PRIORITY']])
meta/classes/package_rpm.bbclass +7 -7
index 1d8c686..3df66cc 100644
@@ -330,7 +330,7 @@ python write_specfile () {
 				if dep and ver:
 					if '-' in ver:
 						subd = oe.packagedata.read_subpkgdata_dict(dep, d)
-						pv = subd['PV']
+						pv = subd['PKGV']
 						reppv = pv.replace('-', '+')
 						ver = ver.replace(pv, reppv)
 				newdeps_dict[dep] = ver
@@ -383,9 +383,9 @@ python write_specfile () {
 	# Construct the SPEC file...
 	srcname    = bb.data.getVar('PN', d, True)
 	srcsummary = (bb.data.getVar('SUMMARY', d, True) or bb.data.getVar('DESCRIPTION', d, True) or ".")
-	srcversion = bb.data.getVar('PV', d, True).replace('-', '+')
-	srcrelease = bb.data.getVar('PR', d, True)
-	srcepoch   = (bb.data.getVar('PE', d, True) or "")
+	srcversion = bb.data.getVar('PKGV', d, True).replace('-', '+')
+	srcrelease = bb.data.getVar('PKGR', d, True)
+	srcepoch   = (bb.data.getVar('PKGE', d, True) or "")
 	srclicense = bb.data.getVar('LICENSE', d, True)
 	srcsection = bb.data.getVar('SECTION', d, True)
 	srcmaintainer  = bb.data.getVar('MAINTAINER', d, True)
@@ -438,9 +438,9 @@ python write_specfile () {
 		splitname    = pkgname
 
 		splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or bb.data.getVar('DESCRIPTION', localdata, True) or ".")
-		splitversion = (bb.data.getVar('PV', localdata, True) or "").replace('-', '+')
-		splitrelease = (bb.data.getVar('PR', localdata, True) or "")
-		splitepoch   = (bb.data.getVar('PE', localdata, True) or "")
+		splitversion = (bb.data.getVar('PKGV', localdata, True) or "").replace('-', '+')
+		splitrelease = (bb.data.getVar('PKGR', localdata, True) or "")
+		splitepoch   = (bb.data.getVar('PKGE', localdata, True) or "")
 		splitlicense = (bb.data.getVar('LICENSE', localdata, True) or "")
 		splitsection = (bb.data.getVar('SECTION', localdata, True) or "")
 		splitdescription = (bb.data.getVar('DESCRIPTION', localdata, True) or ".")
meta/classes/package_tar.bbclass +2 -2
index e546eb7..a806e45 100644
@@ -3,7 +3,7 @@ inherit package
 IMAGE_PKGTYPE ?= "tar"
 
 python package_tar_fn () {
-	fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PV', d), bb.data.getVar('PR', d)))
+	fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PKGV', d), bb.data.getVar('PKGR', d)))
 	fn = bb.data.expand(fn, d)
 	bb.data.setVar('PKGFN', fn, d)
 }
@@ -83,7 +83,7 @@ python do_package_tar () {
 		os.chdir(root)
 		from glob import glob
 		if not glob('*'):
-			bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1)))
+			bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PKGV', localdata, 1), bb.data.getVar('PKGR', localdata, 1)))
 			continue
 		ret = os.system("tar -czf %s %s" % (tarfn, '.'))
 		if ret != 0:
Signature · 1 line
1.7.0.4
author
#6 lore raw

PATCH 6/11 udev: use EXTENDPKGV instead of EXTENDPV.

In reply to Lianhao Lu
---
 meta/recipes-core/udev/udev-new.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-core/udev/udev-new.inc +1 -1
index d1abf39..1b94f1b 100644
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
 DEPENDS = "acl glib-2.0 libusb usbutils pciutils linux-libc-headers gperf-native libxslt-native"
 RPROVIDES_${PN} = "hotplug"
 RRECOMMENDS_${PN} += "udev-extraconf udev-cache usbutils-ids pciutils-ids"
-RDEPENDS_libudev = "${PN} (= ${EXTENDPV})"
+RDEPENDS_libudev = "${PN} (= ${EXTENDPKGV})"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
            file://run.rules \
Signature · 1 line
1.7.0.4
author
#7 lore raw

PATCH 7/11 xcb: use EXTENDPKGV instead of EXTENDPV.

In reply to Lianhao Lu
---
 meta/recipes-graphics/xcb/libpthread-stubs_0.3.bb |    2 +-
 meta/recipes-graphics/xcb/xcb-proto.inc           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/xcb/libpthread-stubs_0.3.bb +1 -1
index 038c00f..40c47da 100644
@@ -20,4 +20,4 @@ SRC_URI[sha256sum] = "35b6d54e3cc6f3ba28061da81af64b9a92b7b757319098172488a660e3
 inherit autotools pkgconfig
 
 RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPV})"
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
meta/recipes-graphics/xcb/xcb-proto.inc +1 -1
index ae40282..d511341 100644
@@ -16,7 +16,7 @@ inherit autotools pkgconfig
 FILES_${PN}-dev += "${datadir}/xcb/*.xml"
 
 RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPV})"
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
 
 DEPENDS_append_virtclass-native = " python-native"
 BBCLASSEXTEND = "native"
Signature · 1 line
1.7.0.4
author
#8 lore raw

PATCH 8/11 xorg-proto: use EXTENDPKGV instead of EXTENDPV.

In reply to Lianhao Lu
---
 .../xorg-proto/xorg-proto-common.inc               |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-graphics/xorg-proto/xorg-proto-common.inc +1 -1
index ab1af28..765e30a 100644
@@ -18,4 +18,4 @@ EXTRA_OECONF = "--with-fop=no"
 
 # ${PN} is empty so we need to tweak -dev and -dbg package dependencies
 RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPV})"
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
Signature · 1 line
1.7.0.4
author
#9 lore raw

PATCH 9/11 xorg-util/util-macros: use EXTENDPKGV instead of EXTENDPV.

In reply to Lianhao Lu
---
 .../xorg-util/util-macros_1.13.0.bb                |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-graphics/xorg-util/util-macros_1.13.0.bb +1 -1
index a708ed0..a6f5402 100644
@@ -16,7 +16,7 @@ DEPENDS_virtclass-native = "gettext"
 DEPENDS_virtclass-nativesdk = "gettext"
 
 RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPV})"
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
 
 BBCLASSEXTEND = "native nativesdk"
 
Signature · 1 line
1.7.0.4
author
#10 lore raw

PATCH 10/11 linux-libc-headers: use EXTENDPKGV instead of EXTENDPV.

In reply to Lianhao Lu
---
 .../linux-libc-headers/linux-libc-headers.inc      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc +1 -1
index 8c5dc76..014024f 100644
@@ -7,4 +7,4 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v2.6/linux-${PV}.tar.bz2"
 
 #DEPENDS = "cross-linkage"
 RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPV})"
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
Signature · 1 line
1.7.0.4
author
#11 lore raw

PATCH 11/11 conf/bitbake.conf: Removed EXTENDPV and EXTENDPEVER.

In reply to Lianhao Lu

Removed the unused variable EXTENDPV and EXTENDPEVER. User should use EXTENDPKGV instead for package feed generation.

---
 meta/conf/bitbake.conf |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +0 -2
index 4fcf4f6..dd68adc 100644
@@ -152,8 +152,6 @@ PV = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.
 PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0'}"
 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
 EXTENDPE = "${@['','${PE\x7d_'][bb.data.getVar('PE',d,1) > 0]}"
-EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
-EXTENDPV = "${EXTENDPEVER}${PV}-${PR}{DISTRO_PR}"
 P = "${PN}-${PV}"
 
 EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][bb.data.getVar('PRAUTO',d,1) is None]}"
Signature · 1 line
1.7.0.4
#12 lore raw
In reply to Lianhao Lu

Hi Lianhao,

Quoted 15 lines · Lianhao Lu

git://git.pokylinux.org/poky-contrib llu/PR-service
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/PR-service

Lianhao Lu (11):
Added the PR service.
conf/bitbake.conf: Added variables for PR service. meta-yocto/local.conf.sample: Added PRSERV_HOST and PRSERV_PORT. classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR. classes/package_xxx.class: Use PKGE/PKGV/PKGR.
udev: use EXTENDPKGV instead of EXTENDPV.
xcb: use EXTENDPKGV instead of EXTENDPV.
xorg-proto: use EXTENDPKGV instead of EXTENDPV. xorg-util/util-macros: use EXTENDPKGV instead of EXTENDPV.
linux-libc-headers: use EXTENDPKGV instead of EXTENDPV. conf/bitbake.conf: Removed EXTENDPV and EXTENDPEVER.

I merged this but I did make some tweaks to both the patch series and one of the patches. The changes I made were:

a) Squash the EXTENDPV and EXTENDPEVER changes into the base patch making all the associated changes in one go.

b) Not include the DISTRO_PR variable for now

c) Not change the default signature handler to basichash.

For c), I'd suggest a follow up patch changing the default in poky.conf in meta-yocto and we'll test this there. This should wait until the PACKAGE_ARCH = "all" sstate issues we've been seeing are addressed though.

Cheers,

Richard

#13 lore raw

Op 27 mei 2011, om 19:00 heeft Richard Purdie het volgende geschreven:

Quoted 25 lines

Hi Lianhao,

Quoted 15 lines · Lianhao Lu

git://git.pokylinux.org/poky-contrib llu/PR-service
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/PR-service

Lianhao Lu (11):
Added the PR service.
conf/bitbake.conf: Added variables for PR service. meta-yocto/local.conf.sample: Added PRSERV_HOST and PRSERV_PORT. classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR. classes/package_xxx.class: Use PKGE/PKGV/PKGR.
udev: use EXTENDPKGV instead of EXTENDPV.
xcb: use EXTENDPKGV instead of EXTENDPV.
xorg-proto: use EXTENDPKGV instead of EXTENDPV. xorg-util/util-macros: use EXTENDPKGV instead of EXTENDPV.
linux-libc-headers: use EXTENDPKGV instead of EXTENDPV. conf/bitbake.conf: Removed EXTENDPV and EXTENDPEVER.

I merged this but I did make some tweaks to both the patch series and one of the patches. The changes I made were:

a) Squash the EXTENDPV and EXTENDPEVER changes into the base patch making all the associated changes in one go.

Quoted 8 lines

b) Not include the DISTRO_PR variable for now

c) Not change the default signature handler to basichash.

For c), I'd suggest a follow up patch changing the default in poky.conf in meta-yocto and we'll test this there. This should wait until the PACKAGE_ARCH = "all" sstate issues we've been seeing are addressed though.

On Fedora 14 I get this when trying to rebuild console-image:

ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
ERROR: Function 'package_get_auto_pr' failed
ERROR: Logfile of failure stored in: /home/koen/angstrom-core/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/dbus-1.4.1-r5/temp/log.do_package.24742 Log data follows:

| ERROR: Error executing a python function in /home/koen/angstrom-core/sources/openembedded-core/meta/recipes-core/dbus/dbus_1.4.1.bb:
| ImportError: No module named xmlrpc
| 
| ERROR: The stack trace of python calls that resulted in this exception/failure was:
| ERROR:   File "package_get_auto_pr", line 11, in <module>
| ERROR:
| ERROR:   File "package_get_auto_pr", line 4, in package_get_auto_pr
| ERROR:
| ERROR:   File "prserv.bbclass", line 8, in prserv_get_pr_auto
| ERROR:
| ERROR:   File "prserv.bbclass", line 2, in prserv_make_conn
| ERROR:
| ERROR:   File "/home/koen/angstrom-core/sources/bitbake/lib/prserv/serv.py", line 6, in <module>
| ERROR:     import bb.server.xmlrpc
| ERROR:
| ERROR: The code that was being executed was:
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR:      0009:
| ERROR:      0010:
| ERROR:  *** 0011:package_get_auto_pr(d)
| ERROR:      0012:
| ERROR: (file: 'package_get_auto_pr', lineno: 11, function: <module>)
| ERROR:      0001:
| ERROR:      0002:def package_get_auto_pr(d):
| ERROR:      0003:     if d.getVar('USE_PR_SERV', True):
| ERROR:  *** 0004:             auto_pr=prserv_get_pr_auto(d)
| ERROR:      0005:             if auto_pr is None:
| ERROR:      0006:                     bb.fatal("Can NOT get auto PR revision from remote PR service")
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
| ERROR: Function 'package_get_auto_pr' failed

It doesn't seem to trigger on my debian box, though

#14 lore raw

Same here.

Quoted 86 lines · Koen Kooi

Op 27 mei 2011, om 19:00 heeft Richard Purdie het volgende geschreven:

Quoted 25 lines

Hi Lianhao,

Quoted 15 lines · Lianhao Lu

 git://git.pokylinux.org/poky-contrib llu/PR-service
 http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/PR-service

Lianhao Lu (11):
 Added the PR service.
 conf/bitbake.conf: Added variables for PR service. meta-yocto/local.conf.sample: Added PRSERV_HOST and PRSERV_PORT. classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR. classes/package_xxx.class: Use PKGE/PKGV/PKGR.
 udev: use EXTENDPKGV instead of EXTENDPV.
 xcb: use EXTENDPKGV instead of EXTENDPV.
 xorg-proto: use EXTENDPKGV instead of EXTENDPV. xorg-util/util-macros: use EXTENDPKGV instead of EXTENDPV.
 linux-libc-headers: use EXTENDPKGV instead of EXTENDPV. conf/bitbake.conf: Removed EXTENDPV and EXTENDPEVER.

I merged this but I did make some tweaks to both the patch series and one of the patches. The changes I made were:

a) Squash the EXTENDPV and EXTENDPEVER changes into the base patch making all the associated changes in one go.

Quoted 8 lines

b) Not include the DISTRO_PR variable for now

c) Not change the default signature handler to basichash.

For c), I'd suggest a follow up patch changing the default in poky.conf in meta-yocto and we'll test this there. This should wait until the PACKAGE_ARCH = "all" sstate issues we've been seeing are addressed though.

On Fedora 14 I get this when trying to rebuild console-image:

ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
ERROR: Function 'package_get_auto_pr' failed
ERROR: Logfile of failure stored in: /home/koen/angstrom-core/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/dbus-1.4.1-r5/temp/log.do_package.24742 Log data follows:

| ERROR: Error executing a python function in /home/koen/angstrom-core/sources/openembedded-core/meta/recipes-core/dbus/dbus_1.4.1.bb:
| ImportError: No module named xmlrpc
|
| ERROR: The stack trace of python calls that resulted in this exception/failure was:
| ERROR:   File "package_get_auto_pr", line 11, in <module>
| ERROR:
| ERROR:   File "package_get_auto_pr", line 4, in package_get_auto_pr
| ERROR:
| ERROR:   File "prserv.bbclass", line 8, in prserv_get_pr_auto
| ERROR:
| ERROR:   File "prserv.bbclass", line 2, in prserv_make_conn
| ERROR:
| ERROR:   File "/home/koen/angstrom-core/sources/bitbake/lib/prserv/serv.py", line 6, in <module>
| ERROR:     import bb.server.xmlrpc
| ERROR:
| ERROR: The code that was being executed was:
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR:      0009:
| ERROR:      0010:
| ERROR:  *** 0011:package_get_auto_pr(d)
| ERROR:      0012:
| ERROR: (file: 'package_get_auto_pr', lineno: 11, function: <module>)
| ERROR:      0001:
| ERROR:      0002:def package_get_auto_pr(d):
| ERROR:      0003:     if d.getVar('USE_PR_SERV', True):
| ERROR:  *** 0004:             auto_pr=prserv_get_pr_auto(d)
| ERROR:      0005:             if auto_pr is None:
| ERROR:      0006:                     bb.fatal("Can NOT get auto PR revision from remote PR service")
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
| ERROR: Function 'package_get_auto_pr' failed

It doesn't seem to trigger on my debian box, though

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#15 lore raw

FWIW, F14 has python 2.7

Op 27 mei 2011, om 21:08 heeft Otavio Salvador het volgende geschreven:

Quoted 101 lines

Same here.

Quoted 86 lines · Koen Kooi

Op 27 mei 2011, om 19:00 heeft Richard Purdie het volgende geschreven:

Quoted 25 lines

Hi Lianhao,

Quoted 15 lines · Lianhao Lu

git://git.pokylinux.org/poky-contrib llu/PR-service
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/PR-service

Lianhao Lu (11):
Added the PR service.
conf/bitbake.conf: Added variables for PR service. meta-yocto/local.conf.sample: Added PRSERV_HOST and PRSERV_PORT. classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR. classes/package_xxx.class: Use PKGE/PKGV/PKGR.
udev: use EXTENDPKGV instead of EXTENDPV.
xcb: use EXTENDPKGV instead of EXTENDPV.
xorg-proto: use EXTENDPKGV instead of EXTENDPV. xorg-util/util-macros: use EXTENDPKGV instead of EXTENDPV.
linux-libc-headers: use EXTENDPKGV instead of EXTENDPV. conf/bitbake.conf: Removed EXTENDPV and EXTENDPEVER.

I merged this but I did make some tweaks to both the patch series and one of the patches. The changes I made were:

a) Squash the EXTENDPV and EXTENDPEVER changes into the base patch making all the associated changes in one go.

Quoted 8 lines

b) Not include the DISTRO_PR variable for now

c) Not change the default signature handler to basichash.

For c), I'd suggest a follow up patch changing the default in poky.conf in meta-yocto and we'll test this there. This should wait until the PACKAGE_ARCH = "all" sstate issues we've been seeing are addressed though.

On Fedora 14 I get this when trying to rebuild console-image:

ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
ERROR: Function 'package_get_auto_pr' failed
ERROR: Logfile of failure stored in: /home/koen/angstrom-core/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/dbus-1.4.1-r5/temp/log.do_package.24742 Log data follows:

| ERROR: Error executing a python function in /home/koen/angstrom-core/sources/openembedded-core/meta/recipes-core/dbus/dbus_1.4.1.bb:
| ImportError: No module named xmlrpc
|
| ERROR: The stack trace of python calls that resulted in this exception/failure was:
| ERROR:   File "package_get_auto_pr", line 11, in <module>
| ERROR:
| ERROR:   File "package_get_auto_pr", line 4, in package_get_auto_pr
| ERROR:
| ERROR:   File "prserv.bbclass", line 8, in prserv_get_pr_auto
| ERROR:
| ERROR:   File "prserv.bbclass", line 2, in prserv_make_conn
| ERROR:
| ERROR:   File "/home/koen/angstrom-core/sources/bitbake/lib/prserv/serv.py", line 6, in <module>
| ERROR:     import bb.server.xmlrpc
| ERROR:
| ERROR: The code that was being executed was:
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR:      0009:
| ERROR:      0010:
| ERROR:  *** 0011:package_get_auto_pr(d)
| ERROR:      0012:
| ERROR: (file: 'package_get_auto_pr', lineno: 11, function: <module>)
| ERROR:      0001:
| ERROR:      0002:def package_get_auto_pr(d):
| ERROR:      0003:     if d.getVar('USE_PR_SERV', True):
| ERROR:  *** 0004:             auto_pr=prserv_get_pr_auto(d)
| ERROR:      0005:             if auto_pr is None:
| ERROR:      0006:                     bb.fatal("Can NOT get auto PR revision from remote PR service")
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
| ERROR: Function 'package_get_auto_pr' failed

It doesn't seem to trigger on my debian box, though

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Signature · 8 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
#16 lore raw
In reply to Koen Kooi
Quoted 42 lines · Koen Kooi

Op 27 mei 2011, om 19:00 heeft Richard Purdie het volgende geschreven:

Quoted 25 lines

Hi Lianhao,

Quoted 15 lines · Lianhao Lu

git://git.pokylinux.org/poky-contrib llu/PR-service
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/PR-service

Lianhao Lu (11):
Added the PR service.
conf/bitbake.conf: Added variables for PR service. meta-yocto/local.conf.sample: Added PRSERV_HOST and PRSERV_PORT. classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR. classes/package_xxx.class: Use PKGE/PKGV/PKGR.
udev: use EXTENDPKGV instead of EXTENDPV.
xcb: use EXTENDPKGV instead of EXTENDPV.
xorg-proto: use EXTENDPKGV instead of EXTENDPV. xorg-util/util-macros: use EXTENDPKGV instead of EXTENDPV.
linux-libc-headers: use EXTENDPKGV instead of EXTENDPV. conf/bitbake.conf: Removed EXTENDPV and EXTENDPEVER.

I merged this but I did make some tweaks to both the patch series and one of the patches. The changes I made were:

a) Squash the EXTENDPV and EXTENDPEVER changes into the base patch making all the associated changes in one go.

Quoted 8 lines

b) Not include the DISTRO_PR variable for now

c) Not change the default signature handler to basichash.

For c), I'd suggest a follow up patch changing the default in poky.conf in meta-yocto and we'll test this there. This should wait until the PACKAGE_ARCH = "all" sstate issues we've been seeing are addressed though.

On Fedora 14 I get this when trying to rebuild console-image:

ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
ERROR: Function 'package_get_auto_pr' failed
ERROR: Logfile of failure stored in: /home/koen/angstrom-core/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/dbus-1.4.1-r5/temp/log.do_package.24742 Log data follows:

Quoted 14 lines
| ERROR: Error executing a python function in /home/koen/angstrom-core/sources/openembedded-core/meta/recipes-core/dbus/dbus_1.4.1.bb:
| ImportError: No module named xmlrpc
| 
| ERROR: The stack trace of python calls that resulted in this exception/failure was:
| ERROR:   File "package_get_auto_pr", line 11, in <module>
| ERROR:
| ERROR:   File "package_get_auto_pr", line 4, in package_get_auto_pr
| ERROR:
| ERROR:   File "prserv.bbclass", line 8, in prserv_get_pr_auto
| ERROR:
| ERROR:   File "prserv.bbclass", line 2, in prserv_make_conn
| ERROR:
| ERROR:   File "/home/koen/angstrom-core/sources/bitbake/lib/prserv/serv.py", line 6, in <module>
| ERROR:     import bb.server.xmlrpc

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Quoted 20 lines
| ERROR:
| ERROR: The code that was being executed was:
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR:      0009:
| ERROR:      0010:
| ERROR:  *** 0011:package_get_auto_pr(d)
| ERROR:      0012:
| ERROR: (file: 'package_get_auto_pr', lineno: 11, function: <module>)
| ERROR:      0001:
| ERROR:      0002:def package_get_auto_pr(d):
| ERROR:      0003:     if d.getVar('USE_PR_SERV', True):
| ERROR:  *** 0004:             auto_pr=prserv_get_pr_auto(d)
| ERROR:      0005:             if auto_pr is None:
| ERROR:      0006:                     bb.fatal("Can NOT get auto PR revision from remote PR service")
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
| ERROR: Function 'package_get_auto_pr' failed
Quoted 1 line

It doesn't seem to trigger on my debian box, though

Are you using Poky on the Debian box?

Cheers,
Joshua

Signature · 3 lines
Joshua Lock
        Yocto Project Build Monkey
        Intel Open Source Technology Centre
#17 lore raw
Quoted 58 lines · Joshua Lock
Quoted 42 lines · Koen Kooi

Op 27 mei 2011, om 19:00 heeft Richard Purdie het volgende geschreven:

Quoted 25 lines

Hi Lianhao,

Quoted 15 lines · Lianhao Lu

 git://git.pokylinux.org/poky-contrib llu/PR-service
 http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/PR-service

Lianhao Lu (11):
 Added the PR service.
 conf/bitbake.conf: Added variables for PR service. meta-yocto/local.conf.sample: Added PRSERV_HOST and PRSERV_PORT. classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR. classes/package_xxx.class: Use PKGE/PKGV/PKGR.
 udev: use EXTENDPKGV instead of EXTENDPV.
 xcb: use EXTENDPKGV instead of EXTENDPV.
 xorg-proto: use EXTENDPKGV instead of EXTENDPV. xorg-util/util-macros: use EXTENDPKGV instead of EXTENDPV.
 linux-libc-headers: use EXTENDPKGV instead of EXTENDPV. conf/bitbake.conf: Removed EXTENDPV and EXTENDPEVER.

I merged this but I did make some tweaks to both the patch series and one of the patches. The changes I made were:

a) Squash the EXTENDPV and EXTENDPEVER changes into the base patch making all the associated changes in one go.

Quoted 8 lines

b) Not include the DISTRO_PR variable for now

c) Not change the default signature handler to basichash.

For c), I'd suggest a follow up patch changing the default in poky.conf in meta-yocto and we'll test this there. This should wait until the PACKAGE_ARCH = "all" sstate issues we've been seeing are addressed though.

On Fedora 14 I get this when trying to rebuild console-image:

ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
ERROR: Function 'package_get_auto_pr' failed
ERROR: Logfile of failure stored in: /home/koen/angstrom-core/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/dbus-1.4.1-r5/temp/log.do_package.24742 Log data follows:

Quoted 14 lines
| ERROR: Error executing a python function in /home/koen/angstrom-core/sources/openembedded-core/meta/recipes-core/dbus/dbus_1.4.1.bb:
| ImportError: No module named xmlrpc
|
| ERROR: The stack trace of python calls that resulted in this exception/failure was:
| ERROR:   File "package_get_auto_pr", line 11, in <module>
| ERROR:
| ERROR:   File "package_get_auto_pr", line 4, in package_get_auto_pr
| ERROR:
| ERROR:   File "prserv.bbclass", line 8, in prserv_get_pr_auto
| ERROR:
| ERROR:   File "prserv.bbclass", line 2, in prserv_make_conn
| ERROR:
| ERROR:   File "/home/koen/angstrom-core/sources/bitbake/lib/prserv/serv.py", line 6, in <module>
| ERROR:     import bb.server.xmlrpc
Quoted 3 lines

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

I use bb master and oe-core

Quoted 23 lines

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Quoted 20 lines
| ERROR:
| ERROR: The code that was being executed was:
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR:      0009:
| ERROR:      0010:
| ERROR:  *** 0011:package_get_auto_pr(d)
| ERROR:      0012:
| ERROR: (file: 'package_get_auto_pr', lineno: 11, function: <module>)
| ERROR:      0001:
| ERROR:      0002:def package_get_auto_pr(d):
| ERROR:      0003:     if d.getVar('USE_PR_SERV', True):
| ERROR:  *** 0004:             auto_pr=prserv_get_pr_auto(d)
| ERROR:      0005:             if auto_pr is None:
| ERROR:      0006:                     bb.fatal("Can NOT get auto PR revision from remote PR service")
| ERROR:      0007:                     return
| ERROR:      0008:             d.setVar('PRAUTO',str(auto_pr))
| ERROR: (file: 'package_get_auto_pr', lineno: 4, function: package_get_auto_pr)
| ERROR: Function 'package_get_auto_pr' failed
Quoted 3 lines
Quoted 1 line

It doesn't seem to trigger on my debian box, though

Are you using Poky on the Debian box?

ubuntu 64bit oe-core no poky

Quoted 14 lines

Cheers,
Joshua
--
Joshua Lock
       Yocto Project Build Monkey
       Intel Open Source Technology Centre

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#18 lore raw
In reply to Joshua Lock
Quoted 2 lines · Joshua Lock

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Seems like my patches didn't make it through? *tries again*

Cheers,
Joshua

Signature · 3 lines
Joshua Lock
        Yocto Project Build Monkey
        Intel Open Source Technology Centre
#19 lore raw
In reply to Joshua Lock
Quoted 5 lines · Joshua Lock

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Something in the pipeline is eating patches.

I'll send them as replies to this message.

Joshua

Signature · 3 lines
Joshua Lock
        Yocto Project Build Monkey
        Intel Open Source Technology Centre
#20 lore raw
Quoted 10 lines · Joshua Lock
Quoted 5 lines · Joshua Lock

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Something in the pipeline is eating patches.

I'll send them as replies to this message.

I think it's the mailing list setup. When I attach a patch it never goes through Inlining the patch does go through

Quoted 12 lines

Joshua

Signature · 9 lines
Joshua Lock
       Yocto Project Build Monkey
       Intel Open Source Technology Centre


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
#21 lore raw
Quoted 10 lines · Khem Raj
Quoted 7 lines · Joshua Lock
Quoted 5 lines · Joshua Lock

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Quoted 7 lines
Quoted 3 lines

Something in the pipeline is eating patches.

I'll send them as replies to this message.

I think it's the mailing list setup. When I attach a patch it never goes through Inlining the patch does go through

Quoted 1 line

Yeah. It seems to be the oe-core list mangling patches. The attachments made it to bitbake-devel fine.

Cheers,
Joshua

Signature · 3 lines
Joshua Lock
        Yocto Project Build Monkey
        Intel Open Source Technology Centre
#22 lore raw
In reply to Joshua Lock

From 4c0915842cd578e67fc9cc85d24538e419a47af8 Mon Sep 17 00:00:00 2001
From: Joshua Lock <[email protected]>
Date: Fri, 27 May 2011 13:03:55 -0700
Subject: [PATCH 1/2] server: add updated/fixed xmlrpc server from Poky

---
 lib/bb/server/xmlrpc.py |  273
+++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 273 insertions(+), 0 deletions(-)
 create mode 100644 lib/bb/server/xmlrpc.py
lib/bb/server/xmlrpc.py new file +16 -0
new file mode 100644
index 0000000..c43c6cd
@@ -0,0 +1,273 @@
+#
+# BitBake XMLRPC Server
+#
+# Copyright (C) 2006 - 2007  Michael 'Mickey' Lauer
+# Copyright (C) 2006 - 2008  Richard Purdie
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License

along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +
+"""
+ This module implements an xmlrpc server for BitBake.
+
+ Use this by deriving a class from BitBakeXMLRPCServer and then
adding
+ methods which you want to "export" via XMLRPC. If the methods have
the
+ prefix xmlrpc_, then registering those function will happen
automatically,
+ if not, you need to call register_function.
+
+ Use register_idle_function() to add a function which the xmlrpc
server
+ calls from within server_forever when no requests are pending. Make
sure
+ that those functions are non-blocking or else you will introduce
latency
+ in the server's main loop.
+"""
+
+import bb
+import xmlrpclib, sys
+from bb import daemonize
+from bb.ui import uievent
+
+DEBUG = False
+
+from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
+import inspect, select
+
+if sys.hexversion < 0x020600F0:
+ print("Sorry, python 2.6 or later is required for bitbake's XMLRPC
mode")
+ sys.exit(1)
+
+##
+# The xmlrpclib.Transport class has undergone various changes in Python 2.7
+# which break BitBake's XMLRPC implementation.
+# To work around this we subclass Transport and have a copy/paste of method
+# implementations from Python 2.6.6's xmlrpclib.
+#
+# Upstream Python bug is #8194 (http://bugs.python.org/issue8194)
+# This bug is relevant for Python 2.7.0 and 2.7.1 but was fixed for +# Python > 2.7.2
+##
+
+class BBTransport(xmlrpclib.Transport):
+ def request(self, host, handler, request_body, verbose=0):
+ h = self.make_connection(host)
+ if verbose:
+ h.set_debuglevel(1)
+

+        self.send_request(h, handler, request_body)
+        self.send_host(h, host)
+        self.send_user_agent(h)
+        self.send_content(h, request_body)

+
+ errcode, errmsg, headers = h.getreply()
+
+ if errcode != 200:
+ raise ProtocolError(

+                host + handler,
+                errcode, errmsg,
+                headers
+                )

+
+ self.verbose = verbose
+
+ try:
+ sock = h._conn.sock
+ except AttributeError:
+ sock = None
+
+ return self._parse_response(h.getfile(), sock)
+
+ def make_connection(self, host):

+        import httplib
+        host, extra_headers, x509 = self.get_host_info(host)
+        return httplib.HTTP(host)

+
+ def _parse_response(self, file, sock):
+ p, u = self.getparser()
+
+ while 1:
+ if sock:
+ response = sock.recv(1024)
+ else:
+ response = file.read(1024)
+ if not response:
+ break
+ if self.verbose:
+ print "body:", repr(response)
+ p.feed(response)
+
+ file.close()
+ p.close()
+
+ return u.close()
+
+def _create_server(host, port):

+    # Python 2.7.0 and 2.7.1 have a buggy Transport implementation
+    # For those versions of Python, and only those versions, use our
+    # own copy/paste BBTransport class.
+    if (2, 7, 0) <= sys.version_info < (2, 7, 2):

+ t = BBTransport()
+ s = xmlrpclib.Server("http://%s:%d/" % (host, port),
transport=t, allow_none=True)
+ else:
+ s = xmlrpclib.Server("http://%s:%d/" % (host, port),
allow_none=True)
+
+ return s
+
+class BitBakeServerCommands():
+ def __init__(self, server, cooker):
+ self.cooker = cooker
+ self.server = server
+
+ def registerEventHandler(self, host, port):

+        """
+        Register a remote UI Event Handler
+        """
+        s = _create_server(host, port)

+
+ return bb.event.register_UIHhandler(s)
+
+ def unregisterEventHandler(self, handlerNum):

+        """
+        Unregister a remote UI Event Handler
+        """
+        return bb.event.unregister_UIHhandler(handlerNum)
+
+    def runCommand(self, command):
+        """
+        Run a cooker command on the server
+        """
+        return self.cooker.command.runCommand(command)
+
+    def terminateServer(self):
+        """
+        Trigger the server to quit
+        """
+        self.server.quit = True
+        print("Server (cooker) exiting")
+        return

+
+ def ping(self):
+ """
+ Dummy method which can be used to check the server is still
alive
+ """
+ return True
+
+class BitBakeServer(SimpleXMLRPCServer):
+ # remove this when you're done with debugging
+ # allow_reuse_address = True
+
+ def __init__(self, cooker, interface = ("localhost", 0)):

+        """
+        Constructor
+        """
+        SimpleXMLRPCServer.__init__(self, interface,
+
requestHandler=SimpleXMLRPCRequestHandler,
+                                    logRequests=False, allow_none=True)
+        self._idlefuns = {}
+        self.host, self.port = self.socket.getsockname()
+        #self.register_introspection_functions()
+        commands = BitBakeServerCommands(self, cooker)
+        self.autoregister_all_functions(commands, "")
+        self.cooker = cooker
+
+    def autoregister_all_functions(self, context, prefix):
+        """
+        Convenience method for registering all functions in the scope
+        of this class that start with a common prefix
+        """
+        methodlist = inspect.getmembers(context, inspect.ismethod)
+        for name, method in methodlist:

+ if name.startswith(prefix):
+ self.register_function(method, name[len(prefix):])
+
+ def register_idle_function(self, function, data):

+        """Register a function to be called while the server is idle"""
+        assert hasattr(function, '__call__')
+        self._idlefuns[function] = data

+
+ def serve_forever(self):
+ bb.cooker.server_main(self.cooker, self._serve_forever)
+
+ def _serve_forever(self):

+        """
+        Serve Requests. Overloaded to honor a quit command
+        """
+        self.quit = False
+        self.timeout = 0 # Run Idle calls for our first callback
+        while not self.quit:
+            #print "Idle queue length %s" % len(self._idlefuns)
+            self.handle_request()
+            #print "Idle timeout, running idle functions"
+            nextsleep = None
+            for function, data in self._idlefuns.items():

+ try:
+ retval = function(self, data, False)
+ if retval is False:
+ del self._idlefuns[function]
+ elif retval is True:
+ nextsleep = 0
+ elif nextsleep is 0:
+ continue
+ elif nextsleep is None:
+ nextsleep = retval
+ elif retval < nextsleep:
+ nextsleep = retval
+ except SystemExit:
+ raise
+ except:

+                    import traceback
+                    traceback.print_exc()
+                    pass

+ if nextsleep is None and len(self._idlefuns) > 0:
+ nextsleep = 0
+ self.timeout = nextsleep
+ # Tell idle functions we're exiting
+ for function, data in self._idlefuns.items():
+ try:
+ retval = function(self, data, True)
+ except:
+ pass
+
+ self.server_close()
+ return
+
+class BitbakeServerInfo():
+ def __init__(self, server):
+ self.host = server.host
+ self.port = server.port
+
+class BitBakeServerFork():
+ def __init__(self, cooker, server, serverinfo, logfile):
+ daemonize.createDaemon(server.serve_forever, logfile)
+
+class BitbakeUILauch():
+ def launch(self, serverinfo, uifunc, *args):
+ return uifunc(*args)
+
+class BitBakeServerConnection():
+ def __init__(self, serverinfo):
+ self.connection = _create_server(serverinfo.host,
serverinfo.port)
+ self.events = uievent.BBUIEventQueue(self.connection)
+ for event in bb.event.ui_queue:
+ self.events.queue_event(event)
+
+ def terminate(self):

+        # Don't wait for server indefinitely
+        import socket
+        socket.setdefaulttimeout(2)
+        try:

+ self.events.system_quit()
+ except:
+ pass
+ try:
+ self.connection.terminateServer()
+ except:
+ pass

Signature · 1 line
1.7.5.1
#23 lore raw
In reply to Joshua Lock

From 1618318f0a30847b08c158e7ac82f9043126144e Mon Sep 17 00:00:00 2001
From: Joshua Lock <[email protected]>
Date: Fri, 27 May 2011 13:04:44 -0700
Subject: [PATCH 2/2] uievent: fix queueing of events for xmlrpc before UI has
loaded

The change to Queue up events before the UI is spawned broke the xmlrpc server because the uievent implementation of BBUIEventQueue expects pickled
strings for its queue_event() method.
This is because the RPC exposed event.send() method must accept pickled strings, but for xmlrpc event.send() is just mapped to queue_event(). Work
around this by adding a send_event method which unpickles strings and hands
them off to queue_event() which can then be used for the remapping.

---
 lib/bb/ui/uievent.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
lib/bb/ui/uievent.py +5 -2
index b404805..2fef4e4 100644
@@ -63,17 +63,20 @@ class BBUIEventQueue:
 
     def queue_event(self, event):
         self.eventQueueLock.acquire()
-        self.eventQueue.append(pickle.loads(event))
+        self.eventQueue.append(event)
         self.eventQueueNotify.set()
         self.eventQueueLock.release()
 
+    def send_event(self, event):
+        self.queue_event(pickle.loads(event))
+
     def startCallbackHandler(self):
 
         server = UIXMLRPCServer()
         self.host, self.port = server.socket.getsockname()
 
         server.register_function( self.system_quit, "event.quit" )
-        server.register_function( self.queue_event, "event.send" )
+        server.register_function( self.send_event, "event.send" )
         server.socket.settimeout(1)
 
         self.EventHandle =

self.BBServer.registerEventHandler(self.host, self.port)

Signature · 1 line
1.7.5.1
#24 lore raw
In reply to Joshua Lock
Quoted 5 lines · Joshua Lock

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

There have been API changes in upstream which mean this code will fail to work with bitbake itself although it will work with the pr server.

I've merged the patches as a bandaid to allow things to work but we've now got two different server backends using different server APIs. I really just want to highlight I'm aware of this and it will get addressed next week. Its been on my todo list and is way overdue. The main priority is to get people's builds with OE-Core working again.

Cheers,

Richard

#25 lore raw
Quoted 7 lines · Richard Purdie
Quoted 5 lines · Joshua Lock

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Quoted 9 lines

There have been API changes in upstream which mean this code will fail to work with bitbake itself although it will work with the pr server.

I've merged the patches as a bandaid to allow things to work but we've now got two different server backends using different server APIs. I really just want to highlight I'm aware of this and it will get addressed next week. Its been on my todo list and is way overdue. The main priority is to get people's builds with OE-Core working again.

btw. I am at 6c412f009e33e77cbcb5d4881c110e6bdda05282 of bitbake I still see the problem

Quoted 11 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#26 lore raw
Quoted 19 lines · Khem Raj
Quoted 7 lines · Richard Purdie
Quoted 5 lines · Joshua Lock

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Quoted 9 lines

There have been API changes in upstream which mean this code will fail to work with bitbake itself although it will work with the pr server.

I've merged the patches as a bandaid to allow things to work but we've now got two different server backends using different server APIs. I really just want to highlight I'm aware of this and it will get addressed next week. Its been on my todo list and is way overdue. The main priority is to get people's builds with OE-Core working again.

Quoted 3 lines

btw. I am at 6c412f009e33e77cbcb5d4881c110e6bdda05282 of bitbake I still see the problem

here is the error

NOTE: Running task 919 of 925 (ID: 9, /home/kraj/work/angstrom/sources/openembedded-core/meta/recipes-core/uclibc/uclibc_git.bb,
do_package)
NOTE: package uclibc-0.9.31+0.9.32rc3-r2.2: task do_package: Started
ERROR: Connecting to PR service None:None failed: int() argument must
be a string or a number, not 'NoneType'
ERROR: Function 'package_get_auto_pr' failed
ERROR: Logfile of failure stored in:
/home/kraj/work/angstrom/build/tmp-angstrom_2010_x-uclibc/work/efikamx-angstrom-linux-uclibceabi/uclibc-0.9.31+0.9.32rc3-r2.2/temp/log.do_package.5207 Log data follows:
| ERROR: Connecting to PR service None:None failed: int() argument
must be a string or a number, not 'NoneType'
| ERROR: Function 'package_get_auto_pr' failed
NOTE: package uclibc-0.9.31+0.9.32rc3-r2.2: task do_package: Failed
ERROR: Task 9 (/home/kraj/work/angstrom/sources/openembedded-core/meta/recipes-core/uclibc/uclibc_git.bb,
do_package) failed with exit code '1'
ERROR: '/home/kraj/work/angstrom/sources/openembedded-core/meta/recipes-core/uclibc/uclibc_git.bb'
failed

Quoted 12 lines
Quoted 11 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#27 lore raw
Quoted 37 lines · Khem Raj
Quoted 19 lines · Khem Raj
Quoted 7 lines · Richard Purdie
Quoted 5 lines · Joshua Lock

Upstream BitBake still has the xmlrpc server removed. The version in Poky's BitBake is functional (I use it daily).

Attached are two patches against BitBake master to add back the xmlrpc server (copied from Poky's tree) and fix the uievent.

Quoted 9 lines

There have been API changes in upstream which mean this code will fail to work with bitbake itself although it will work with the pr server.

I've merged the patches as a bandaid to allow things to work but we've now got two different server backends using different server APIs. I really just want to highlight I'm aware of this and it will get addressed next week. Its been on my todo list and is way overdue. The main priority is to get people's builds with OE-Core working again.

Quoted 3 lines

btw. I am at 6c412f009e33e77cbcb5d4881c110e6bdda05282 of bitbake I still see the problem

here is the error

NOTE: Running task 919 of 925 (ID: 9, /home/kraj/work/angstrom/sources/openembedded-core/meta/recipes-core/uclibc/uclibc_git.bb,
do_package)
NOTE: package uclibc-0.9.31+0.9.32rc3-r2.2: task do_package: Started
ERROR: Connecting to PR service None:None failed: int() argument must
be a string or a number, not 'NoneType'
ERROR: Function 'package_get_auto_pr' failed
ERROR: Logfile of failure stored in:
/home/kraj/work/angstrom/build/tmp-angstrom_2010_x-uclibc/work/efikamx-angstrom-linux-uclibceabi/uclibc-0.9.31+0.9.32rc3-r2.2/temp/log.do_package.5207 Log data follows:

Quoted 10 lines

| ERROR: Connecting to PR service None:None failed: int() argument
must be a string or a number, not 'NoneType'
| ERROR: Function 'package_get_auto_pr' failed
NOTE: package uclibc-0.9.31+0.9.32rc3-r2.2: task do_package: Failed
ERROR: Task 9 (/home/kraj/work/angstrom/sources/openembedded-core/meta/recipes-core/uclibc/uclibc_git.bb, do_package) failed with exit code '1'
ERROR: '/home/kraj/work/angstrom/sources/openembedded-core/meta/recipes-core/uclibc/uclibc_git.bb' failed

this patch seems to fix it.

http://patches.openembedded.org/patch/4941/

Quoted 13 lines
Quoted 12 lines
Quoted 11 lines

Cheers,

Richard

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core