[packagekit] help with conary backend

zodman zodman at gmail.com
Fri Nov 14 12:42:31 PST 2008


Thanks richard for answer.

Richard Hughes escribió:
> On Fri, 2008-11-14 at 01:25 -0600, zodman wrote:
>> Im a foresight developer doing some task for fix the conary backend on
>> packagekit.
> 
> Excellent! You should probably have commit access to get the very latest
> code. If you want this, can you send me (offlist) your public RSA ssh
> key, your full name, and your chosen username.


Oh :) tnx for the access. But i think from now the backend are on
development. Im send patches to kenvandine for review ( as mentor
tasker). When backend go stable. Ken commit it. No problem from now
about the acces the repository.


>> On the git version the backend are very buggy! some commands not works.
>> Im devel and debugg the backend and fix it .
> 
> Cool.
> 
>> Ken Vandine are noticed  of this. But not a guru of PackageKit have some
>>   task what not help me.
>>
>> For example on the backend doing a:
>> python conaryBackend.py update-packages
>> "pastebinit;0.7-1-1;x86;/foresight.rpath.org at fl:2-qa/1222042924.172:0.7-1-1,1#x86"
>>
>> the conary update the package Perfthout problems
> 
> pkcon != conary where you can do "pkcon update foo" to _install_ foo. In
> PackageKit language, an install is different to an update.
> 
>> But with packagekit.
>>
>> $ ./pkcon update  pastebinit
>> Command failed:  This tool could not update 'pastebinit': Internal
>> error: Operation not yet supported by backend
> 
> I've noticed the option struct was slightly the wrong order -- I've
> fixed that in 933fd5ac9f8befc03a54cded23e5ee562707be9c -- although that
> shouldn't affect this problem.
> 
>> Here the log of packagekitd.
>>
>> http://dpaste.com/90666/
>>
>> at line 155 the package is found and get the id .... using the method
>> resolve of conaryBackend.py
>>
>> then make a error what not understand...
>>
>> - WhatProvides method called: any, pastebinit
>> - Not implemented yet: WhatProvides
> 
> Right. This is the clue. The way packagekit "resolves" a name like pastebinit to
> "pastebinit;0.7-1-1;x86;/foresight.rpath.org at fl:2-qa/1222042924.172:0.7-1-1,1#x86"
> is to internally do:
> 
> pkcon --filter "installed" resolve pastebinit
> 
> if this doesn't find anything, then it then tries:
> 
> pkcon --filter "installed" what-provides pastebinit
> 
> if this doesn't find anything, then we return with an error, in this
> case, a really unhelpful error. I've improved the error message in
> 0cd77f708b6996439745cc5489cf9121ec8dba07
> 
> I've fixed pkcon in commit 9c25a0936c3c5127664496ad071409b9673b3e35 to
> not even try to do WhatProvides if it's not implemented by the daemon.



Yes im pull up the latest of code :) and whatprovides requires delete.


What you say i have a problem with the resolve method. Im check it.


Well on the resolve with pkcon works fine (without filters).

$ ./pkcon resolve pastebinit
available   	pastebinit-0.7-1-1                   [===============]

But with filters.

zodman at cosmogirl:~/lab/dev/packagekit/pk-orig/client
$ ./pkcon resolve --filter "installed"  pastebinit
zodman at cosmogirl:~/lab/dev/packagekit/pk-orig/client
$ ./pkcon resolve --filter "available"  pastebinit
available   	pastebinit-0.7-1-1                   [===============]
$ ./pkcon resolve --filter "~installed"  pastebinit
available   	pastebinit-0.7-1-1                   [===============]


Im seen works good tooo. On packagekitd not have error codes.

the error of:
- emitting message backend-error, 'resolve emitted package that was
~installed when the installed filter is in place'
no present.


Ok so here the output of all on the backend.

root at cosmogirl:~/lab/dev/packagekit/pk-orig/backends/conary
#  python conaryBackend.py  resolve ~installed pastebinit
allow-cancel	true
no-percentage-updates
status	info
allow-cancel	true
no-percentage-updates
status	query

package	available
pastebinit;0.7-1-1;x86;/foresight.rpath.org at fl:2-qa/1222042924.172:0.7-1-1,1#x86

finished
root at cosmogirl:~/lab/dev/packagekit/pk-orig/backends/conary
#
root at cosmogirl:~/lab/dev/packagekit/pk-orig/backends/conary
#  python conaryBackend.py  resolve installed pastebinit
allow-cancel	true
no-percentage-updates
status	info
allow-cancel	true
no-percentage-updates
status	query
package	available
pastebinit;0.7-1-1;x86;/foresight.rpath.org at fl:2-qa/1222042924.172:0.7-1-1,1#x86

finished

root at cosmogirl:~/lab/dev/packagekit/pk-orig/backends/conary
#  python conaryBackend.py  resolve available pastebinit
allow-cancel	true
no-percentage-updates
status	info
allow-cancel	true
no-percentage-updates
status	query
package	available
pastebinit;0.7-1-1;x86;/foresight.rpath.org at fl:2-qa/1222042924.172:0.7-1-1,1#x86

finished



what im wrong ? needs other info for determine the problem ?


> The reason the resolve failed is obvious from the daemon log:
> 
>> - emit package available, pastebinit;0.7-1-1;x86;/foresight.rpath.org at fl:2-qa/1222042924.172:0.7-1-1,1#x86,  
>> TI:01:14:50	TH:0x8e8d008	FI:pk-backend.c	FN:pk_backend_message,966
>>  - emit message 4, resolve emitted package that was ~installed when the installed filter is in place
>> TI:01:14:50	TH:0x8e8d008	FI:pk-transaction.c	FN:pk_transaction_message_cb,708
>>  - emitting message backend-error, 'resolve emitted package that was ~installed when the installed filter is in place'
> 
> So the Resolve implementation is wrong -- pkcon is asking the backend to
> match a package name to a package_id that are already installed, but the
> backend returns results that are not installed! This is probably just
> the resolve function not respecting the filter settings.
> 
> This might be the case where pastebinit isn't installed.
> 
>> The method whatprovides are not present on conary backend, so this need
>> coded ? or exist other task to do ? What exactly whatprovides do ? whats
>> the ouput need for this method ?
>>
>> The Method  update-package ( at dispatcher.command as update_packages )
>> never executed. Why not ???
> 
> Right. The resolve failed (wrong package value in resolve, WhatProvides
> not implemented), so we couldn't find a package_id. update-packages
> operates on a package_id, not a package name.
> 
>> Sorry by poor english im mexican :S
> 
> Don't apologise, your English is fine. It's me who should apologise for
> the code errors! :-)
> 
> Richard.
> 
> 
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit




More information about the PackageKit mailing list