[packagekit] help with conary backend

zodman zodman at gmail.com
Sat Nov 15 09:01:17 PST 2008


I got it!!!!!!!!!!!

im found the implement needed.

the Method _do_installed_filtering on Filter not work fine.

fixing .................................

tnx rich!

Richard Hughes escribió:
> On Fri, 2008-11-14 at 14:42 -0600, zodman wrote:
>> 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.
> 
> Sure, that's fine with me.
> 
>> 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                   [===============]
> 
> You can't use "available" as a filter. You can either use "installed" or
> "~installed" (not installed). 'available' is just the return value
> from ::Package()
> 
> Of course, this is my fault for allowing the user to specify an invalid
> filter using pkcon, so I've fixed this in
> baba96aaf2d564a01480c47dfe4d769e89c3b383 so that if you specify an
> invalid filter it gives you an error rather than just using the elements
> it recognises.
> 
>> 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
> 
> This looks right.
> 
>> 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
> 
> This is the problem -- you're asking the backend for all packages that
> are installed "resolve installed pastebinit" and the backend is
> returning with "package available pastebinit" which is not available,
> _not_ installed!
> 
> If there's nothing installed, then you don't return anything for this
> function. If you look in the backend/yum/yumBackend.py code you'll see
> how we did the filtering there -- I've even created a yumFilter.py
> module which implements the common filter.py code. It's likely you just
> want to make conaryFilter.py work correctly and copy the model from yum.
> 
> Richard.
> 
> 
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit




More information about the PackageKit mailing list