[packagekit] Dynamic Groups in Packagekit

Tim Lauridsen tim.lauridsen at googlemail.com
Fri Sep 26 03:33:34 PDT 2008


Richard Hughes wrote:
> On Tue, 2008-09-23 at 08:56 +0200, Tim Lauridsen wrote:
>> 1. the categories/groups used in the installer is different than the
>> one defined in packagekit, that is confusing for the user.
>>
>> 2. the packagekit groups are hardcoded, so the distro has no way to
>> add special groups, important to the distro.
> 
> For 0.3.x we need to keep the current hardcoded groups. When we want to
> add API to support other types of groups, we'll do it in 0.4.x
> 
> Please don't commit anything in 0.3.x (master) if you want to play with
> any new features and apis, please create a branch in packagekit.org git
> and work there.
> 
> I know we are all keen to find a better solution, but for now I think
> it's best we work in a branch and then we can cheery pick later when we
> branch for 0.4.x.
> 
> Richard.
> 
> 
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit

Ok, now how the need API additions runnning in the 'dynamic-group' branch.

i have 2 new API method:
GetCategories()		: Get collection categories from backend.
GetCollections()	: Get collections from backend

And 2 new signals:
Category:
   cat_id	: category id (fx. apps)
   name		: Category name
   summary	: Category description
   icon		: path to icon for category on locale system.

Collection:
   grp_id	: group id with '@' prefix (ex. @kde-desktop)
   cat_id	: category id (fx. apps)
   name		: Translated collection name
   summary	: Translated collection description
   icon		: path to icon for collection on locale system.

I have made the changes to the yumBackend to handle the API.
I have also added support to the python API to test the stuff.

Then code dont break the current 0.3.x API in any way, so pk-application 
work without changes with the current hardcoded group.

How to test (with yum backend):
cd to your pk git checkout:
git checkout --track -b dynamic-groups origin/dynamic-groups
mkdir $HOME/root
./configure --prefix=$HOME/root --enable-yum --with-default-backend=yum
make
make install
mkdir -r $HOME/root/var/log
ln -s $HOME//root/lib/python2.5/site-packages/packagekit 
/$HOME/root/share/PackageKit/helpers/yum/.
cd src
sudo ./run-pk.sh yum
Open new console window or tab. (cd to pk git checkout)
cd python
./wrapper-test.py get-collections

Tim

I have attached a patch with the changes against master branch.





-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dynamic-group.patch
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20080926/899e1807/attachment-0002.txt>


More information about the PackageKit mailing list