From: Martin Jansa <martin.jansa@gmail.com>
To: Constantin Musca <constantinx.musca@intel.com>
Cc: bitbake-devel@lists.openembedded.org,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/3] prserv: use only PRSERV_HOST
Date: Fri, 25 Jan 2013 14:47:05 +0100 [thread overview]
Message-ID: <20130125134705.GF3200@jama> (raw)
In-Reply-To: <1358952843-14300-1-git-send-email-constantinx.musca@intel.com>
[-- Attachment #1: Type: text/plain, Size: 3231 bytes --]
On Wed, Jan 23, 2013 at 04:54:03PM +0200, Constantin Musca wrote:
> - remove PRSERV_PORT variable
> - use 'hostname:port' as PRSERV_HOST format
> - use 'localhost:0' for enabling the local PRServer
Please update
https://wiki.yoctoproject.org/wiki/index.php?title=PR_Service
This seems to break 'bitbake-prserv-tool migrate_localcount'
ERROR: Execution of event handler 'primport_handler' failed################################################################################## | ETA: 00:00:00
Traceback (most recent call last):
File "primport_handler(e)", line 9, in primport_handler(e=<bb.event.ParseCompleted object at 0xce963d0>)
File "/OE/shr-core/openembedded-core/meta/lib/oe/prservice.py", line 43, in prserv_import_db(d=<bb.data_smart.DataSmart object at 0x1aff710>, filter_version=None, filter_pkgarch=None, filter_checksum=None):
if conn is None:
> conn = prserv_make_conn(d)
if conn is None:
File "/OE/shr-core/openembedded-core/meta/lib/oe/prservice.py", line 13, in prserv_make_conn(d=<bb.data_smart.DataSmart object at 0x1aff710>, check=False):
except Exception, exc:
> bb.fatal("Connecting to PR service %s:%s failed: %s" % (host, port, str(exc)))
NameError: global name 'host' is not defined
Cheers,
>
> [YOCTO #3744]
>
> Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
> ---
> bitbake/lib/prserv/serv.py | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
> index 5567c6f..d8bdf31 100644
> --- a/bitbake/lib/prserv/serv.py
> +++ b/bitbake/lib/prserv/serv.py
> @@ -268,10 +268,17 @@ def is_local_special(host, port):
>
> def auto_start(d):
> global singleton
> - if (not d.getVar('PRSERV_HOST', True)) or (not d.getVar('PRSERV_PORT', True)):
> +
> + host_params = filter(None, (d.getVar('PRSERV_HOST', True) or '').split(':'))
> + if not host_params:
> + return True
> +
> + if len(host_params) != 2:
> + logger.critical('\n'.join(['PRSERV_HOST: incorrect format',
> + 'Usage: PRSERV_HOST = "<hostname>:<port>"']))
> return True
>
> - if is_local_special(d.getVar('PRSERV_HOST', True), int(d.getVar('PRSERV_PORT', True))) and not singleton:
> + if is_local_special(host_params[0], int(host_params[1])) and not singleton:
> import bb.utils
> cachedir = (d.getVar("PERSISTENT_DIR", True) or d.getVar("CACHE", True))
> if not cachedir:
> @@ -285,8 +292,8 @@ def auto_start(d):
> if singleton:
> host, port = singleton.getinfo()
> else:
> - host = d.getVar('PRSERV_HOST', True)
> - port = int(d.getVar('PRSERV_PORT', True))
> + host = host_params[0]
> + port = int(host_params[1])
>
> try:
> return PRServerConnection(host,port).ping()
> --
> 1.7.11.7
>
>
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Martin Jansa <martin.jansa@gmail.com>
To: Constantin Musca <constantinx.musca@intel.com>
Cc: bitbake-devel@lists.openembedded.org,
openembedded-core@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH 1/3] prserv: use only PRSERV_HOST
Date: Fri, 25 Jan 2013 14:47:05 +0100 [thread overview]
Message-ID: <20130125134705.GF3200@jama> (raw)
In-Reply-To: <1358952843-14300-1-git-send-email-constantinx.musca@intel.com>
[-- Attachment #1: Type: text/plain, Size: 3231 bytes --]
On Wed, Jan 23, 2013 at 04:54:03PM +0200, Constantin Musca wrote:
> - remove PRSERV_PORT variable
> - use 'hostname:port' as PRSERV_HOST format
> - use 'localhost:0' for enabling the local PRServer
Please update
https://wiki.yoctoproject.org/wiki/index.php?title=PR_Service
This seems to break 'bitbake-prserv-tool migrate_localcount'
ERROR: Execution of event handler 'primport_handler' failed################################################################################## | ETA: 00:00:00
Traceback (most recent call last):
File "primport_handler(e)", line 9, in primport_handler(e=<bb.event.ParseCompleted object at 0xce963d0>)
File "/OE/shr-core/openembedded-core/meta/lib/oe/prservice.py", line 43, in prserv_import_db(d=<bb.data_smart.DataSmart object at 0x1aff710>, filter_version=None, filter_pkgarch=None, filter_checksum=None):
if conn is None:
> conn = prserv_make_conn(d)
if conn is None:
File "/OE/shr-core/openembedded-core/meta/lib/oe/prservice.py", line 13, in prserv_make_conn(d=<bb.data_smart.DataSmart object at 0x1aff710>, check=False):
except Exception, exc:
> bb.fatal("Connecting to PR service %s:%s failed: %s" % (host, port, str(exc)))
NameError: global name 'host' is not defined
Cheers,
>
> [YOCTO #3744]
>
> Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
> ---
> bitbake/lib/prserv/serv.py | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
> index 5567c6f..d8bdf31 100644
> --- a/bitbake/lib/prserv/serv.py
> +++ b/bitbake/lib/prserv/serv.py
> @@ -268,10 +268,17 @@ def is_local_special(host, port):
>
> def auto_start(d):
> global singleton
> - if (not d.getVar('PRSERV_HOST', True)) or (not d.getVar('PRSERV_PORT', True)):
> +
> + host_params = filter(None, (d.getVar('PRSERV_HOST', True) or '').split(':'))
> + if not host_params:
> + return True
> +
> + if len(host_params) != 2:
> + logger.critical('\n'.join(['PRSERV_HOST: incorrect format',
> + 'Usage: PRSERV_HOST = "<hostname>:<port>"']))
> return True
>
> - if is_local_special(d.getVar('PRSERV_HOST', True), int(d.getVar('PRSERV_PORT', True))) and not singleton:
> + if is_local_special(host_params[0], int(host_params[1])) and not singleton:
> import bb.utils
> cachedir = (d.getVar("PERSISTENT_DIR", True) or d.getVar("CACHE", True))
> if not cachedir:
> @@ -285,8 +292,8 @@ def auto_start(d):
> if singleton:
> host, port = singleton.getinfo()
> else:
> - host = d.getVar('PRSERV_HOST', True)
> - port = int(d.getVar('PRSERV_PORT', True))
> + host = host_params[0]
> + port = int(host_params[1])
>
> try:
> return PRServerConnection(host,port).ping()
> --
> 1.7.11.7
>
>
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
next prev parent reply other threads:[~2013-01-25 14:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 14:54 [PATCH 1/3] prserv: use only PRSERV_HOST Constantin Musca
2013-01-25 13:47 ` Martin Jansa [this message]
2013-01-25 13:47 ` [bitbake-devel] " Martin Jansa
2013-01-25 14:00 ` [PATCH] prservice.py: fix NameError: global name 'host' is not defined Martin Jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130125134705.GF3200@jama \
--to=martin.jansa@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=constantinx.musca@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.