[zhongwenjia@build ~]$ koji call createEmptyBuild nvidia 1 1.3 ""
Fault: <Fault 1: "<class 'pg.DatabaseError'>: error 'ERROR:* operator does not exist: text = integer
LINE 2:**** WHERE pkg_id=9168 AND version=1 AND release='1.3'
**************************************** ^
HINT:* No operator matches the given name and argument type(s). You might need to add explicit type casts.
' in 'SELECT id,state,task_id FROM build
*** WHERE pkg_id=9168 AND version=1 AND release='1.3'
*** FOR UPDATE'">
[zhongwenjia@build ~]$ koji call createEmptyBuild nvidia 1.1 1.3 ""
Fault: <Fault 1: '<class 'pg.DatabaseError'>: error 'ERROR:* invalid input syntax for integer: ""
LINE 4:**** VALUES (18338,9169,'1.1','1.3',',
****************************************** ^
' in '
*** INSERT INTO build (id,pkg_id,version,release,epoch,state,
*********** task_id,owner,completion_time)
*** VALUES (18338,9169,'1.1','1.3',',
*********** 1,NULL,1,'NOW')
*** '>
[zhongwenjia@build ~]$ koji call createEmptyBuild nvidia 1.1 1.3 2
18339
[zhongwenjia@build ~]$ koji call createEmptyBuild nvidia 1.1 1.3
Fault: <Fault 1: "<type 'exceptions.TypeError'>: createEmptyBuild() takes at least 5 arguments (4 given)">
if version is a number , not string , how to do it ?
what is epoch argument ? Default is NULL. How to give a NULL value ?
koji-hub-1.3.2-1.fc13.noarch
Thanks
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
04-04-2011, 02:08 PM
Mike McLean
arguments for koji api "createEmptyBuild"
On 04/02/2011 01:55 AM, Eric Zhong wrote:
> if version is a number , not string , how to do it ?
> what is epoch argument ? Default is NULL. How to give a NULL value ?
Epoch values must be integer or null. When using the call command, you
can specify a python None value (which maps to null in the db) by name.
E.g.
# koji call createEmptyBuild nvidia 1 1.3 None
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
04-06-2011, 02:12 AM
Eric Zhong
arguments for koji api "createEmptyBuild"
Version be treated as a integer!!!
How to give a integer to koji as string ???
Is it a bug of koji ???
Thanks.
[zhongwenjia@build ~]$ koji call createEmptyBuild nvidia 1 1.3 None
Fault: <Fault 1: "<class 'pg.DatabaseError'>: error 'ERROR:* operator does not exist: text = integer
LINE 2:**** WHERE pkg_id=9170 AND version=1 AND release='1.3'
**************************************** ^
HINT:* No operator matches the given name and argument type(s). You might need to add explicit type casts.
' in 'SELECT id,state,task_id FROM build
*** WHERE pkg_id=9170 AND version=1 AND release='1.3'
*** FOR UPDATE'">
[zhongwenjia@build ~]$ koji call createEmptyBuild nvidia 1.0 1.3 None
18340
2011/4/4 Mike McLean <mikem@redhat.com>
On 04/02/2011 01:55 AM, Eric Zhong wrote:
> if version is a number , not string , how to do it ?
> what is epoch argument ? Default is NULL. How to give a NULL value ?
Epoch values must be integer or null. When using the call command, you
can specify a python None value (which maps to null in the db) by name.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
04-06-2011, 03:21 PM
Mike McLean
arguments for koji api "createEmptyBuild"
On 04/05/2011 10:12 PM, Eric Zhong wrote:
> Version be treated as a integer!!!
> How to give a integer to koji as string ???
> Is it a bug of koji ???
> Thanks.
>
> [zhongwenjia@build ~]$ koji call createEmptyBuild nvidia 1 1.3 None
> Fault:<Fault 1: "<class 'pg.DatabaseError'>: error 'ERROR: operator does
> not exist: text = integer
LINE 2: WHERE pkg_id=9170 AND version=1 AND
> release='1.3'
^
HINT: No
> operator matches the given name and argument type(s). You might need to add
> explicit type casts.
' in 'SELECT id,state,task_id FROM build
WHERE
> pkg_id=9170 AND version=1 AND release='1.3'
FOR UPDATE'">
>
> [zhongwenjia@build ~]$ koji call createEmptyBuild nvidia 1.0 1.3 None
> 18340
The call command in the cli isn't perfect. It's really more of a
debugging tool. Unfortunately there's no way for it to know whether you
mean the string "1" or the integer 1. If you're running a sufficiently
new python, you can use the --python option to have the arguments
interpreted as python expressions. E.g.
# koji call --python createEmptyBuild '"nvidia"' '"1"' '"1.3"' None
Otherwise you'll need to make the xmlrpc call more directly. Something like:
# python
>>> import koji
>>> session = koji.ClientSession('SERVER_URL')
>>> # if using krb auth, use the following:
>>> session.krb_login()
>>> # otherwise use one of the other login methods defined in ClientSession
>>> session.createEmptyBuild('nvidia', '1', '1.3', None)
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys