Richard Hughes | 1 Nov 08:45 2007

packagekit: Branch 'master' - 6 commits

 backends/smart/helpers/get-depends.py  |   19 ++++++++++++
 backends/smart/helpers/get-files.py    |   19 ++++++++++++
 backends/smart/helpers/smartBackend.py |   49 +++++++++++++++++++++++++++++++++
 backends/smart/pk-backend-smart.c      |    4 +-
 backends/yum/helpers/yumBackend.py     |    2 -
 backends/yum/pk-backend-yum.c          |    1 
 html/pk-faq.html                       |    4 +-
 7 files changed, 93 insertions(+), 5 deletions(-)

New commits:
commit 25b191618833cac059b25d96e121adecec628bff
Merge: 266c7d0... 8e9d406...
Author: James Bowes <jbowes@...>
Date:   Wed Oct 31 23:30:35 2007 -0400

    Merge branch 'smart'

    Conflicts:

    	html/pk-faq.html

diff --cc html/pk-faq.html
index 4f79315,14de232..ff4c7b0
--- a/html/pk-faq.html
+++ b/html/pk-faq.html
 <at>  <at>  <at>  -37,10 -37,10 +37,10  <at>  <at>  <at>  install-package   |   X    |  X  |     
  install-file      |        |  X  |     |  X  |      |       |   X  |
  remove-package    |   X    |  X  |     |  X  |  X   |   X   |   X  |
  update-package    |        |  X  |     |  X  |      |   X   |   X  |
- get-depends       |        |  X  |     |  X  |      |       |   X  |
(Continue reading)

Matej Cepl | 1 Nov 08:58 2007
Picon

Re: Status of x86_64 support?

On 2007-10-31, 21:33 GMT, Richard Hughes wrote:
> On Wed, 2007-10-31 at 22:13 +0100, Matej Cepl wrote:
>> Any ideas?
>
> Ahh, the automated fd.o push failed. Can you try now pls.

Output of packagekitd is 
http://www.ceplovi.cz/matej/tmp/packagekitd-log.txt
No output was produced in gnome-terminal when running
pkcon search name gstramer-plugin
pk-update-icon switched to „Setting up (Cancelling)“ and when 
I cliecked on Refresh package list (or whatever is the name) 
bug-buddy got interested with the result seen on 
http://www.ceplovi.cz/matej/tmp/pk-update-icon-bugreport.txt

What next?

Matěj

_______________________________________________
PackageKit mailing list
PackageKit <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/packagekit
S.Çağlar Onur | 1 Nov 09:19 2007
Picon

Re: Categories/Groups in yum on a Fedora system

Hi;

31 Eki 2007 Çar tarihinde, S.Çağlar Onur şunları yazmıştı: 
> 31 Eki 2007 Çar tarihinde, Tim Lauridsen şunları yazmıştı:
> > I will add unicode convertion code.
>
> This breakes PiSi backend, not investigated what's wrong (and cannot for a
> while) but if needed here is the backtrace;

We found the problem, PiSi uses a special str class called LocalText which 
handles all these unicode conversions for us, it handles all fields 
translations and it also selects output language according to locale 
settings, like following;

In [17]: type(a.summary)
Out[17]: <class 'pisi.pxml.autoxml.LocalText'>

In [18]: a.summary["tr"]
Out[18]: 'GNU Bource again kabuğu'

In [19]: a.summary["en"]
Out[19]: 'The standard GNU Bourne again shell'

So isinstance(txt, types.UnicodeType) check fails and unicode( txt, 'utf-8' ) 
raises following;

In [25]: unicode( a.summary, 'utf-8' )
---------------------------------------------------------------------------
exceptions.TypeError
Traceback (most recent call last)
(Continue reading)

Tim Lauridsen | 1 Nov 09:29 2007

Re: Export GROUP_UNKNOWN to backends

Richard Hughes wrote:
On Wed, 2007-10-31 at 17:33 +0200, S.Çağlar Onur wrote:
commit 26d69ac6757dd14742ad51ce70dd0649db033d8f Author: S.Çağlar Onur <caglar-caicS1wCkhO6A22drWdTBw@public.gmane.org> Date: Wed Oct 31 17:13:45 2007 +0200 export GROUP_UNKNOWN to backends diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py index f2e8ae5..6495f63 100644 --- a/python/packagekit/backend.py +++ b/python/packagekit/backend.py <at> <at> -97,6 +97,7 <at> <at> GROUP_FONTS = "fonts" GROUP_ADMIN_TOOLS = "admin-tools" GROUP_LEGACY = "legacy" GROUP_LOCALIZATION = "localization" +GROUP_UNKNOWN = "unknown"
Sane.
But instantly this question triggered in my mind. Do we have to map all groups to known ones? If not, following one also needed by PK-Gnome but this means group list will start to show a group called "Unknown" to users. What should i do (revert the above or pushing following)? diff --git a/src/pk-common-gui.c b/src/pk-common-gui.c index 6226c16..d898b0d 100644 --- a/src/pk-common-gui.c +++ b/src/pk-common-gui.c <at> <at> -641,6 +641,9 <at> <at> pk_group_enum_to_localised_text (PkGroupEnum group) case PK_GROUP_ENUM_LOCALIZATION: text = _("Localization"); break; + case PK_GROUP_ENUM_UNKNOWN: + text = _("Unknown"); + break; default: pk_error ("group unrecognised: %i", group); }
Push this, as it should be there anyway - but i don't think we should show an "unknown" in pk-application - maybe we can just special case it. Richard. _______________________________________________ PackageKit mailing list PackageKit-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org http://lists.freedesktop.org/mailman/listinfo/packagekit
Do we need a GROUP_UNKNOWN ???

Uncategorised packages should go into GROUP_OTHER or in no groups at all

Tim
<div>
Richard Hughes wrote:
<blockquote cite="mid:1193852532.3197.1.camel <at> hughsie-laptop" type="cite">
  On Wed, 2007-10-31 at 17:33 +0200, S.&Ccedil;a&#287;lar Onur wrote:

  <blockquote type="cite">
    commit 26d69ac6757dd14742ad51ce70dd0649db033d8f
Author: S.&Ccedil;a&#287;lar Onur <a class="moz-txt-link-rfc2396E" href="mailto:caglar@...">&lt;caglar@...&gt;</a>
Date:   Wed Oct 31 17:13:45 2007 +0200

    export GROUP_UNKNOWN to backends

diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index f2e8ae5..6495f63 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
 <at>  <at>  -97,6 +97,7  <at>  <at>  GROUP_FONTS             = "fonts"
 GROUP_ADMIN_TOOLS       = "admin-tools"
 GROUP_LEGACY            = "legacy"
 GROUP_LOCALIZATION      = "localization"
+GROUP_UNKNOWN           = "unknown"

  </blockquote>

Sane.

  
  <blockquote type="cite">
    But instantly this question triggered in my mind. Do we have to map all groups 
to known ones? If not, following one also needed by PK-Gnome but this means 
group list will start to show a group called "Unknown" to users.

What should i do (revert the above or pushing following)?

diff --git a/src/pk-common-gui.c b/src/pk-common-gui.c
index 6226c16..d898b0d 100644
--- a/src/pk-common-gui.c
+++ b/src/pk-common-gui.c
 <at>  <at>  -641,6 +641,9  <at>  <at>  pk_group_enum_to_localised_text (PkGroupEnum group)
 	case PK_GROUP_ENUM_LOCALIZATION:
 		text = _("Localization");
 		break;
+	case PK_GROUP_ENUM_UNKNOWN:
+		text = _("Unknown");
+		break;
 	default:
 		pk_error ("group unrecognised: %i", group);
 	}

  </blockquote>

Push this, as it should be there anyway - but i don't think we should
show an "unknown" in pk-application - maybe we can just special case it.

Richard.

_______________________________________________
PackageKit mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PackageKit@...edesktop.org">PackageKit@...</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/packagekit">http://lists.freedesktop.org/mailman/listinfo/packagekit</a>

</blockquote>
Do we need a GROUP_UNKNOWN ???<br><br>
Uncategorised packages should go into GROUP_OTHER or in no groups at all<br><br>
Tim<br>
</div>
S.Çağlar Onur | 1 Nov 09:37 2007
Picon

Re: Export GROUP_UNKNOWN to backends

01 Kas 2007 Per tarihinde, Tim Lauridsen şunları yazmıştı: 
> Do we need a GROUP_UNKNOWN ???
>
> Uncategorised packages should go into GROUP_OTHER or in no groups at all

I think we need, PiSi uses GROUP_OTHER for uncategories ones (so GROUP_OTHER 
is really a group for us) and GROUP_UNKNOWN as a failover. Cause backend has 
hardcoded PiSi Component <-> PK Group map but components can be added our 
repository virtually which makes imposibble to sync with PK at all.

Cheers
-- 
S.Çağlar Onur <caglar@...>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
01 Kas 2007 Per tarihinde, Tim Lauridsen şunları yazmıştı: 
> Do we need a GROUP_UNKNOWN ???
>
> Uncategorised packages should go into GROUP_OTHER or in no groups at all

I think we need, PiSi uses GROUP_OTHER for uncategories ones (so GROUP_OTHER 
is really a group for us) and GROUP_UNKNOWN as a failover. Cause backend has 
hardcoded PiSi Component <-> PK Group map but components can be added our 
repository virtually which makes imposibble to sync with PK at all.

Cheers
--

-- 
S.Çağlar Onur <caglar@...>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
Tim Lauridsen | 1 Nov 10:26 2007

Re: YUM backend problems

Richard Hughes wrote:
> Another backend problem:
>
> Traceback (most recent call last):
>   File "/usr/share/PackageKit/helpers/yum/search-group.py", line 21, in <module>
>     backend.search_group(options,searchterms)
>   File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 357, in search_group
>     pkgGroupDict = self._buildGroupDict()
>   File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 335, in _buildGroupDict
>     cats = self.yumbase.comps.categories
>   File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 542, in <lambda>
>     comps = property(fget=lambda self: self._getGroups(),
>   File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 486, in _getGroups
>     if not repo.ready():
>   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 283, in ready
>     return self.repoXML is not None
>   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 769, in <lambda>
>     repoXML = property(fget=lambda self: self._getRepoXML(),
>   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 765, in _getRepoXML
>     raise Errors.RepoError, msg
> yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml) for repository:
livna-testing. Please verify its path and try again
> [hughsie <at> hughsie-laptop src]$ 
>
> Can we catch all yum.Errors - and even if we don't recognize them just
> emit INTERNAL_ERROR and the RepoError in the description. Just doing a
> traceback is not a great thing to do at all.
>
> Thanks guys,
>
> Richard.
>
>
> _______________________________________________
> PackageKit mailing list
> PackageKit@...
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>   
There have fixed it. so search-group will send a ERROR_NO_CACHE if 
something is missing in the cache, like the other search helpers.
I also fixed an issue in refresh-cache so it will read the group 
metadata & made search-group only look in the cache.

Tim
Richard Hughes | 1 Nov 19:50 2007

packagekit: Branch 'master' - 4 commits

 backends/pisi/helpers/Makefile.am     |    1 
 backends/pisi/helpers/pisiBackend.py  |  106 ++++++++++++++++++++++++++++++++--
 backends/pisi/helpers/search-group.py |   19 ++++++
 backends/pisi/pk-backend-pisi.c       |   36 ++++++++++-
 backends/yum/helpers/yumBackend.py    |  100 +++++++++++++++++++++++---------
 html/pk-faq.html                      |    2 
 python/packagekit/backend.py          |   16 -----
 7 files changed, 230 insertions(+), 50 deletions(-)

New commits:
commit 5e221352f3914f969d6e4f2c857827483693cc70
Author: Tim Lauridsen <tla@...>
Date:   Thu Nov 1 10:10:29 2007 +0100

    yum: make refresh-cache populate the cache with group metadata & let the search-group work in cache only

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 1b9f8b7..70cbae6 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
 <at>  <at>  -391,6 +391,8  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
         '''
         self.allow_interrupt(True)
         self.percentage(None)
+        self.yumbase.doConfigSetup(errorlevel=0,debuglevel=0)# Setup Yum Config
+        self.yumbase.conf.cache = 1 # Only look in cache.
         try:
             pkgGroupDict = self._buildGroupDict()
             self.yumbase.conf.cache = 1 # Only look in cache.
 <at>  <at>  -622,7 +624,7  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
                 return

             #work out the slice for each one
-            bump = (100/len(self.yumbase.repos.listEnabled()))/2
+            bump = (95/len(self.yumbase.repos.listEnabled()))/2

             for repo in self.yumbase.repos.listEnabled():
                 repo.metadata_expire = 0
 <at>  <at>  -633,6 +635,9  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
                 pct+=bump
                 self.percentage(pct)

+            self.percentage(95)
+            # Setup categories/groups
+            self.yumbase.doGroupSetup()      
             #we might have a rounding error
             self.percentage(100)

 <at>  <at>  -994,6 +999,7  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
         self.yumbase.conf.throttle = "40%"                        # Set bandwidth throttle to 40%
         self.dnlCallback = DownloadCallback(self,showNames=True)  # Download callback
         self.yumbase.repos.setProgressBar( self.dnlCallback )     # Setup the download callback class
+        

 class DownloadCallback( BaseMeter ):
     """ Customized version of urlgrabber.progress.BaseMeter class """
commit 29b747c4f12e189eaf322df482fed8613f9c029c
Author: Tim Lauridsen <tla@...>
Date:   Thu Nov 1 10:01:56 2007 +0100

    yum: make searcg-groups emit a ERROR_NO_CACHE the cache dont contain updated metadata

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 3ad3933..1b9f8b7 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
 <at>  <at>  -383,6 +383,7  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
                 for pkg in group.conditional_packages.keys():
                     pkgGroups[pkg] = "%s;%s" % (cat.categoryid,group.groupid)
         return pkgGroups
+            

     def search_group(self,filters,key):
         '''
 <at>  <at>  -390,33 +391,36  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
         '''
         self.allow_interrupt(True)
         self.percentage(None)
-        pkgGroupDict = self._buildGroupDict()
-        self.yumbase.conf.cache = 1 # Only look in cache.
-        fltlist = filters.split(';')
-        found = {}
-
-        if not FILTER_NON_INSTALLED in fltlist:
-            # Check installed for group
-            for pkg in self.yumbase.rpmdb:
-                group = GROUP_OTHER                    # Default Group
-                if pkgGroupDict.has_key(pkg.name):     # check if pkg name exist in package / group dictinary
-                    cg = pkgGroupDict[pkg.name]
-                    if groupMap.has_key(cg):
-                        group = groupMap[cg]           # use the pk group name, instead of yum 'category/group'
-                if group == key:
-                    if self._do_extra_filtering(pkg, fltlist):
-                        self._show_package(pkg, INFO_INSTALLED)
-        if not FILTER_INSTALLED in fltlist:
-            # Check available for group
-            for pkg in self.yumbase.pkgSack:
-                group = GROUP_OTHER
-                if pkgGroupDict.has_key(pkg.name):
-                    cg = pkgGroupDict[pkg.name]
-                    if groupMap.has_key(cg):
-                        group = groupMap[cg]
-                if group == key:
-                    if self._do_extra_filtering(pkg, fltlist):
-                        self._show_package(pkg, INFO_AVAILABLE)
+        try:
+            pkgGroupDict = self._buildGroupDict()
+            self.yumbase.conf.cache = 1 # Only look in cache.
+            fltlist = filters.split(';')
+            found = {}
+    
+            if not FILTER_NON_INSTALLED in fltlist:
+                # Check installed for group
+                for pkg in self.yumbase.rpmdb:
+                    group = GROUP_OTHER                    # Default Group
+                    if pkgGroupDict.has_key(pkg.name):     # check if pkg name exist in package / group dictinary
+                        cg = pkgGroupDict[pkg.name]
+                        if groupMap.has_key(cg):
+                            group = groupMap[cg]           # use the pk group name, instead of yum 'category/group'
+                    if group == key:
+                        if self._do_extra_filtering(pkg, fltlist):
+                            self._show_package(pkg, INFO_INSTALLED)
+            if not FILTER_INSTALLED in fltlist:
+                # Check available for group
+                for pkg in self.yumbase.pkgSack:
+                    group = GROUP_OTHER
+                    if pkgGroupDict.has_key(pkg.name):
+                        cg = pkgGroupDict[pkg.name]
+                        if groupMap.has_key(cg):
+                            group = groupMap[cg]
+                    if group == key:
+                        if self._do_extra_filtering(pkg, fltlist):
+                            self._show_package(pkg, INFO_AVAILABLE)
+        except yum.Errors.RepoError,e:
+            self.error(ERROR_NO_CACHE,"Yum cache is invalid")

     def search_file(self,filters,key):
         '''
commit cee138ad07bbb271f969a74ae87e52fa666368b1
Author: Tim Lauridsen <tla@...>
Date:   Thu Nov 1 09:44:07 2007 +0100

    yum: move UTF convertion to yumBackend, so it don't break other backends (PiSi)

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 04939cf..3ad3933 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
 <at>  <at>  -212,6 +212,42  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
         if lock:
             self.doLock()

+    def description(self,id,licence,group,desc,url,bytes,file_list):
+        '''
+        Send 'description' signal
+         <at> param id: The package ID name, e.g. openoffice-clipart;2.6.22;ppc64;fedora
+         <at> param licence: The licence of the package
+         <at> param group: The enumerated group
+         <at> param desc: The multi line package description
+         <at> param url: The upstream project homepage
+         <at> param bytes: The size of the package, in bytes
+         <at> param file_list: List of the files in the package, separated by ';'
+        '''
+        desc = self._toUTF(desc)
+        PackageKitBaseBackend.description(self,id,licence,group,desc,url,bytes,file_list)
+
+    def package(self,id,status,summary):
+        '''
+        send 'package' signal
+         <at> param info: the enumerated INFO_* string
+         <at> param id: The package ID name, e.g. openoffice-clipart;2.6.22;ppc64;fedora
+         <at> param summary: The package Summary
+        '''
+        summary = self._toUTF(summary)
+        PackageKitBaseBackend.package(self,id,status,summary)
+
+    def _toUTF( self, txt ):
+        rc=""
+        if isinstance(txt,types.UnicodeType):
+            return txt
+        else:
+            try:
+                rc = unicode( txt, 'utf-8' )
+            except UnicodeDecodeError, e:
+                rc = unicode( txt, 'iso-8859-1' )
+            return rc
+
+
     def doLock(self):
         ''' Lock Yum'''
         retries = 0
diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index 9c38a9e..e0285ef 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
 <at>  <at>  -157,7 +157,6  <at>  <at>  class PackageKitBaseBackend:
          <at> param id: The package ID name, e.g. openoffice-clipart;2.6.22;ppc64;fedora
          <at> param summary: The package Summary
         '''
-        summary = self._toUTF(summary)
         print >> sys.stdout,"package\t%s\t%s\t%s" % (status,id,summary)

     def status(self,state):
 <at>  <at>  -193,7 +192,6  <at>  <at>  class PackageKitBaseBackend:
          <at> param bytes: The size of the package, in bytes
          <at> param file_list: List of the files in the package, separated by ';'
         '''
-        desc = self._toUTF(desc)
         print >> sys.stdout,"description\t%s\t%s\t%s\t%s\t%s\t%ld\t%s" % (id,licence,group,desc,url,bytes,file_list)

     def files(self, id, file_list):
 <at>  <at>  -257,19 +255,7  <at>  <at>  class PackageKitBaseBackend:
             containing (name,ver,arch,data)
         '''
         return tuple(id.split(';', 4))
-        
-
-    def _toUTF( self, txt ):
-        rc=""
-        if isinstance(txt,types.UnicodeType):
-            return txt
-        else:
-            try:
-                rc = unicode( txt, 'utf-8' )
-            except UnicodeDecodeError, e:
-                rc = unicode( txt, 'iso-8859-1' )
-            return rc
-        
+       
 #
 # Backend Action Methods
 #
commit 5ef2114adeaf90805dde45da70fecaff7bc83f6e
Author: S.Çağlar Onur <caglar@...>
Date:   Thu Nov 1 09:47:37 2007 +0200

    PiSi: implement search_group and get_group

diff --git a/backends/pisi/helpers/Makefile.am b/backends/pisi/helpers/Makefile.am
index b9eef2f..d657cc1 100644
--- a/backends/pisi/helpers/Makefile.am
+++ b/backends/pisi/helpers/Makefile.am
 <at>  <at>  -17,6 +17,7  <at>  <at>  dist_helper_DATA = 			\
 	resolve.py			\
 	repo-set-data.py		\
 	search-file.py			\
+	search-group.py			\
 	search-name.py			\
 	update.py			\
 	update-system.py		\
diff --git a/backends/pisi/helpers/pisiBackend.py b/backends/pisi/helpers/pisiBackend.py
index 9e2e9de..9ba6999 100644
--- a/backends/pisi/helpers/pisiBackend.py
+++ b/backends/pisi/helpers/pisiBackend.py
 <at>  <at>  -23,6 +23,81  <at>  <at>  from packagekit.backend import *

 class PackageKitPisiBackend(PackageKitBaseBackend):

+    # It's an ugly way to sync with PK Groups and PiSi Components
+    # Maybe we can provide these with our index?
+    groups = {
+            "applications" : GROUP_UNKNOWN,
+            "applications.admin" : GROUP_ADMIN_TOOLS,
+            "applications.archive" : GROUP_UNKNOWN,
+            "applications.crypto" : GROUP_SECURITY,
+            "applications.doc" : GROUP_PUBLISHING,
+            "applications.doc.docbook" : GROUP_PUBLISHING,
+            "applications.editors" : GROUP_ACCESSORIES,
+            "applications.editors.emacs" : GROUP_ACCESSORIES,
+            "applications.emulators" : GROUP_UNKNOWN,
+            "applications.filesystems" : GROUP_UNKNOWN,
+            "applications.games" : GROUP_GAMES,
+            "applications.hardware" : GROUP_UNKNOWN,
+            "applications.multimedia" : GROUP_MULTIMEDIA,
+            "applications.network" : GROUP_INTERNET,
+            "applications.network.mozilla" : GROUP_INTERNET,
+            "applications.pda" : GROUP_ACCESSORIES,
+            "applications.powermanagement" : GROUP_UNKNOWN,
+            "applications.printing" : GROUP_PUBLISHING,
+            "applications.science" : GROUP_EDUCATION,
+            "applications.science.astronomy" : GROUP_EDUCATION,
+            "applications.science.electronics" : GROUP_EDUCATION,
+            "applications.science.mathematics" : GROUP_EDUCATION,
+            "applications.security" : GROUP_SECURITY,
+            "applications.shells" : GROUP_UNKNOWN,
+            "applications.tex" : GROUP_PUBLISHING,
+            "applications.util" : GROUP_ACCESSORIES,
+            "applications.virtualization" : GROUP_VIRTUALIZATION,
+            "desktop.fonts" : GROUP_FONTS,
+            "desktop.freedesktop" : GROUP_DESKTOPS,
+            "desktop.freedesktop.inputmethods" : GROUP_LOCALIZATION,
+            "desktop.freedesktop.xorg" : GROUP_DESKTOPS,
+            "desktop.freedesktop.xorg.lib" : GROUP_DESKTOPS,
+            "desktop.gnome" : GROUP_DESKTOPS,
+            "desktop.kde" : GROUP_DESKTOPS,
+            "desktop.kde.base" : GROUP_DESKTOPS,
+            "desktop.kde.i18n" : GROUP_LOCALIZATION,
+            "kernel" : GROUP_SYSTEM,
+            "kernel.drivers" : GROUP_SYSTEM,
+            "kernel.firmware" : GROUP_SYSTEM,
+            "kernel-xen" : GROUP_VIRTUALIZATION,
+            "kernel-xen.dom0" : GROUP_VIRTUALIZATION,
+            "kernel-xen.dom0.drivers" : GROUP_VIRTUALIZATION,
+            "kernel-xen.dom0.firmware" : GROUP_VIRTUALIZATION,
+            "kernel-xen.domU" : GROUP_VIRTUALIZATION,
+            "programming" : GROUP_PROGRAMMING,
+            "programming.environments" : GROUP_PROGRAMMING,
+            "programming.environments.eclipse" : GROUP_PROGRAMMING,
+            "programming.languages" : GROUP_PROGRAMMING,
+            "programming.languages.dotnet" : GROUP_PROGRAMMING,
+            "programming.languages.gambas" : GROUP_PROGRAMMING,
+            "programming.languages.haskell" : GROUP_PROGRAMMING,
+            "programming.languages.java" : GROUP_PROGRAMMING,
+            "programming.languages.lisp" : GROUP_PROGRAMMING,
+            "programming.languages.pascal" : GROUP_PROGRAMMING,
+            "programming.languages.perl" : GROUP_PROGRAMMING,
+            "programming.languages.php" : GROUP_PROGRAMMING,
+            "programming.languages.python" : GROUP_PROGRAMMING,
+            "programming.languages.tcl" : GROUP_PROGRAMMING,
+            "programming.libs" : GROUP_PROGRAMMING,
+            "programming.tools" : GROUP_PROGRAMMING,
+            "server" : GROUP_SERVERS,
+            "server.database" : GROUP_SERVERS,
+            "server.mail" : GROUP_SERVERS,
+            "server.nis" : GROUP_SERVERS,
+            "server.www" : GROUP_SERVERS,
+            "system" : GROUP_SYSTEM,
+            "system.base" : GROUP_SYSTEM,
+            "system.devel" : GROUP_PROGRAMMING,
+            "system.doc" : GROUP_SYSTEM,
+            "system.locale" : GROUP_LOCALIZATION
+        }
+
     def __init__(self, args):
         PackageKitBaseBackend.__init__(self, args)

 <at>  <at>  -32,6 +107,10  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):
         self.packagedb = pisi.db.packagedb.PackageDB()
         self.repodb = pisi.db.repodb.RepoDB()

+        # Do not ask any question to users
+        self.options = pisi.config.Options()
+        self.options.yes_all = True
+
     def __get_package_version(self, package):
         """ Returns version string of given package """
         # Internal FIXME: PiSi may provide this
 <at>  <at>  -52,7 +131,7  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):
         else:
             self.error(ERROR_INTERNAL_ERROR, "Package was not found")

-        if filters:
+        if filters or "none" not in filters:
             filterlist = filters.split(';')

             if FILTER_INSTALLED in filterlist and status != INFO_INSTALLED:
 <at>  <at>  -86,9 +165,15  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):

         if self.packagedb.has_package(package):
             pkg = self.packagedb.get_package(package)
+
+            if self.groups.has_key(pkg.partOf):
+                group = self.groups[pkg.partOf]
+            else:
+                group = GROUP_UNKNOWN
+
             self.description("%s-%s" % (pkg.name, self.__get_package_version(pkg)),
                             pkg.license,
-                            pkg.partOf,
+                            group,
                             pkg.description,
                             pkg.packageURI,
                             pkg.packageSize, "")
 <at>  <at>  -104,15 +189,13  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):

         if self.installdb.has_package(package):
             pkg = self.installdb.get_files(package)
-            
+
             # FIXME: Add "/" as suffix
             files = map(lambda y: y.path, pkg.list)

             file_list = ";".join(files)

             self.files(package, file_list)
-        else:
-            self.error(ERROR_INTERNAL_ERROR, "Package was not found")

     def get_repo_list(self):
         """ Prints available repositories """
 <at>  <at>  -260,6 +343,19  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):
         for pkg, files in pisi.api.search_file(key):
             self.__get_package(pkg)

+    def search_group(self, filters, group):
+        """ Prints a list of packages contains search term """
+        self.allow_interrupt(True)
+        self.percentage(None)
+
+        try:
+            for key in self.groups.keys():
+                if self.groups[key] == group:
+                    for pkg in self.componentdb.get_packages(key, walk = True):
+                        self.__get_package(pkg, filters)
+        except:
+            self.error(ERROR_INTERNAL_ERROR, "Component %s was not found" % group)
+
     def search_name(self, filters, package):
         """ Prints a list of packages contains search term """
         self.allow_interrupt(True)
diff --git a/backends/pisi/helpers/search-group.py b/backends/pisi/helpers/search-group.py
new file mode 100644
index 0000000..064149b
--- /dev/null
+++ b/backends/pisi/helpers/search-group.py
 <at>  <at>  -0,0 +1,19  <at>  <at> 
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2007 S.Çağlar Onur <caglar@...>
+#
+# Licensed under the GNU General Public License Version 2
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+import sys
+import pisiBackend
+
+backend = pisiBackend.PackageKitPisiBackend(sys.argv[1:])
+backend.search_group(sys.argv[1], sys.argv[2])
+
+sys.exit()
diff --git a/backends/pisi/pk-backend-pisi.c b/backends/pisi/pk-backend-pisi.c
index 0aa410e..2af9f50 100644
--- a/backends/pisi/pk-backend-pisi.c
+++ b/backends/pisi/pk-backend-pisi.c
 <at>  <at>  -24,6 +24,38  <at>  <at> 
 #include <pk-backend-python.h>

 /**
+ * backend_get_groups:
+ */
+static void
+backend_get_groups (PkBackend *backend, PkEnumList *elist)
+{
+	g_return_if_fail (backend != NULL);
+	pk_enum_list_append_multiple (elist,
+				         /* PK_GROUP_ENUM_ACCESSIBILITY, */
+				         PK_GROUP_ENUM_ACCESSORIES,
+				         PK_GROUP_ENUM_EDUCATION,
+				         PK_GROUP_ENUM_GAMES,
+				         /* PK_GROUP_ENUM_GRAPHICS, */
+				         PK_GROUP_ENUM_INTERNET,
+				         /* PK_GROUP_ENUM_OFFICE, */
+				         /* PK_GROUP_ENUM_OTHER, */
+				         PK_GROUP_ENUM_PROGRAMMING,
+				         PK_GROUP_ENUM_MULTIMEDIA,
+				         PK_GROUP_ENUM_SYSTEM,
+				         PK_GROUP_ENUM_DESKTOPS,
+				         PK_GROUP_ENUM_PUBLISHING,
+				         PK_GROUP_ENUM_SERVERS,
+				         PK_GROUP_ENUM_FONTS,
+				         PK_GROUP_ENUM_ADMIN_TOOLS,
+				         /* PK_GROUP_ENUM_LEGACY, */
+				         PK_GROUP_ENUM_LOCALIZATION,
+				         PK_GROUP_ENUM_VIRTUALIZATION,
+				         PK_GROUP_ENUM_SECURITY,
+				         PK_GROUP_ENUM_UNKNOWN,
+				         -1);
+}
+
+/**
  * backend_get_filters:
  */
 static void
 <at>  <at>  -42,7 +74,7  <at>  <at>  PK_BACKEND_OPTIONS (
 	"S.Çağlar Onur <caglar@...>",		/* author */
 	NULL,						/* initalize */
 	NULL,						/* destroy */
-	NULL,						/* get_groups */
+	backend_get_groups,				/* get_groups */
 	backend_get_filters,				/* get_filters */
 	pk_backend_python_cancel,			/* cancel */
 	pk_backend_python_get_depends,			/* get_depends */
 <at>  <at>  -59,7 +91,7  <at>  <at>  PK_BACKEND_OPTIONS (
 	NULL,						/* rollback */
 	NULL,						/* search_details */
 	pk_backend_python_search_file,			/* search_file */
-	NULL,						/* search_group */
+	pk_backend_python_search_group,			/* search_group */
 	pk_backend_python_search_name,			/* search_name */
 	pk_backend_python_update_package,		/* update_package */
 	pk_backend_python_update_system,		/* update_system */
diff --git a/html/pk-faq.html b/html/pk-faq.html
index ff4c7b0..82a7849 100644
--- a/html/pk-faq.html
+++ b/html/pk-faq.html
 <at>  <at>  -32,7 +32,7  <at>  <at>  update-system     |   X    |  X  |     |  X  |      |   X   |   X  |
 search-name       |   X    |  X  |  X  |  X  |  X   |   X   |   X  |
 search-details    |        |  X  |  X  |  X  |      |       |      |
 search-file       |        |  X  |     |  X  |      |       |   X  |
-search-group      |        |  X  |     |     |      |       |      |
+search-group      |        |  X  |     |     |      |       |   X  |
 install-package   |   X    |  X  |     |  X  |  X   |   X   |   X  |
 install-file      |        |  X  |     |  X  |      |       |   X  |
 remove-package    |   X    |  X  |     |  X  |  X   |   X   |   X  |
 backends/pisi/helpers/Makefile.am     |    1 
 backends/pisi/helpers/pisiBackend.py  |  106 ++++++++++++++++++++++++++++++++--
 backends/pisi/helpers/search-group.py |   19 ++++++
 backends/pisi/pk-backend-pisi.c       |   36 ++++++++++-
 backends/yum/helpers/yumBackend.py    |  100 +++++++++++++++++++++++---------
 html/pk-faq.html                      |    2 
 python/packagekit/backend.py          |   16 -----
 7 files changed, 230 insertions(+), 50 deletions(-)

New commits:
commit 5e221352f3914f969d6e4f2c857827483693cc70
Author: Tim Lauridsen <tla@...>
Date:   Thu Nov 1 10:10:29 2007 +0100

    yum: make refresh-cache populate the cache with group metadata & let the search-group work in cache only

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 1b9f8b7..70cbae6 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
 <at>  <at>  -391,6 +391,8  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
         '''
         self.allow_interrupt(True)
         self.percentage(None)
+        self.yumbase.doConfigSetup(errorlevel=0,debuglevel=0)# Setup Yum Config
+        self.yumbase.conf.cache = 1 # Only look in cache.
         try:
             pkgGroupDict = self._buildGroupDict()
             self.yumbase.conf.cache = 1 # Only look in cache.
 <at>  <at>  -622,7 +624,7  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
                 return

             #work out the slice for each one
-            bump = (100/len(self.yumbase.repos.listEnabled()))/2
+            bump = (95/len(self.yumbase.repos.listEnabled()))/2

             for repo in self.yumbase.repos.listEnabled():
                 repo.metadata_expire = 0
 <at>  <at>  -633,6 +635,9  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
                 pct+=bump
                 self.percentage(pct)

+            self.percentage(95)
+            # Setup categories/groups
+            self.yumbase.doGroupSetup()      
             #we might have a rounding error
             self.percentage(100)

 <at>  <at>  -994,6 +999,7  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
         self.yumbase.conf.throttle = "40%"                        # Set bandwidth throttle to 40%
         self.dnlCallback = DownloadCallback(self,showNames=True)  # Download callback
         self.yumbase.repos.setProgressBar( self.dnlCallback )     # Setup the download callback class
+        

 class DownloadCallback( BaseMeter ):
     """ Customized version of urlgrabber.progress.BaseMeter class """
commit 29b747c4f12e189eaf322df482fed8613f9c029c
Author: Tim Lauridsen <tla@...>
Date:   Thu Nov 1 10:01:56 2007 +0100

    yum: make searcg-groups emit a ERROR_NO_CACHE the cache dont contain updated metadata

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 3ad3933..1b9f8b7 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
 <at>  <at>  -383,6 +383,7  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
                 for pkg in group.conditional_packages.keys():
                     pkgGroups[pkg] = "%s;%s" % (cat.categoryid,group.groupid)
         return pkgGroups
+            

     def search_group(self,filters,key):
         '''
 <at>  <at>  -390,33 +391,36  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
         '''
         self.allow_interrupt(True)
         self.percentage(None)
-        pkgGroupDict = self._buildGroupDict()
-        self.yumbase.conf.cache = 1 # Only look in cache.
-        fltlist = filters.split(';')
-        found = {}
-
-        if not FILTER_NON_INSTALLED in fltlist:
-            # Check installed for group
-            for pkg in self.yumbase.rpmdb:
-                group = GROUP_OTHER                    # Default Group
-                if pkgGroupDict.has_key(pkg.name):     # check if pkg name exist in package / group dictinary
-                    cg = pkgGroupDict[pkg.name]
-                    if groupMap.has_key(cg):
-                        group = groupMap[cg]           # use the pk group name, instead of yum 'category/group'
-                if group == key:
-                    if self._do_extra_filtering(pkg, fltlist):
-                        self._show_package(pkg, INFO_INSTALLED)
-        if not FILTER_INSTALLED in fltlist:
-            # Check available for group
-            for pkg in self.yumbase.pkgSack:
-                group = GROUP_OTHER
-                if pkgGroupDict.has_key(pkg.name):
-                    cg = pkgGroupDict[pkg.name]
-                    if groupMap.has_key(cg):
-                        group = groupMap[cg]
-                if group == key:
-                    if self._do_extra_filtering(pkg, fltlist):
-                        self._show_package(pkg, INFO_AVAILABLE)
+        try:
+            pkgGroupDict = self._buildGroupDict()
+            self.yumbase.conf.cache = 1 # Only look in cache.
+            fltlist = filters.split(';')
+            found = {}
+    
+            if not FILTER_NON_INSTALLED in fltlist:
+                # Check installed for group
+                for pkg in self.yumbase.rpmdb:
+                    group = GROUP_OTHER                    # Default Group
+                    if pkgGroupDict.has_key(pkg.name):     # check if pkg name exist in package / group dictinary
+                        cg = pkgGroupDict[pkg.name]
+                        if groupMap.has_key(cg):
+                            group = groupMap[cg]           # use the pk group name, instead of yum 'category/group'
+                    if group == key:
+                        if self._do_extra_filtering(pkg, fltlist):
+                            self._show_package(pkg, INFO_INSTALLED)
+            if not FILTER_INSTALLED in fltlist:
+                # Check available for group
+                for pkg in self.yumbase.pkgSack:
+                    group = GROUP_OTHER
+                    if pkgGroupDict.has_key(pkg.name):
+                        cg = pkgGroupDict[pkg.name]
+                        if groupMap.has_key(cg):
+                            group = groupMap[cg]
+                    if group == key:
+                        if self._do_extra_filtering(pkg, fltlist):
+                            self._show_package(pkg, INFO_AVAILABLE)
+        except yum.Errors.RepoError,e:
+            self.error(ERROR_NO_CACHE,"Yum cache is invalid")

     def search_file(self,filters,key):
         '''
commit cee138ad07bbb271f969a74ae87e52fa666368b1
Author: Tim Lauridsen <tla@...>
Date:   Thu Nov 1 09:44:07 2007 +0100

    yum: move UTF convertion to yumBackend, so it don't break other backends (PiSi)

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 04939cf..3ad3933 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
 <at>  <at>  -212,6 +212,42  <at>  <at>  class PackageKitYumBackend(PackageKitBaseBackend):
         if lock:
             self.doLock()

+    def description(self,id,licence,group,desc,url,bytes,file_list):
+        '''
+        Send 'description' signal
+         <at> param id: The package ID name, e.g. openoffice-clipart;2.6.22;ppc64;fedora
+         <at> param licence: The licence of the package
+         <at> param group: The enumerated group
+         <at> param desc: The multi line package description
+         <at> param url: The upstream project homepage
+         <at> param bytes: The size of the package, in bytes
+         <at> param file_list: List of the files in the package, separated by ';'
+        '''
+        desc = self._toUTF(desc)
+        PackageKitBaseBackend.description(self,id,licence,group,desc,url,bytes,file_list)
+
+    def package(self,id,status,summary):
+        '''
+        send 'package' signal
+         <at> param info: the enumerated INFO_* string
+         <at> param id: The package ID name, e.g. openoffice-clipart;2.6.22;ppc64;fedora
+         <at> param summary: The package Summary
+        '''
+        summary = self._toUTF(summary)
+        PackageKitBaseBackend.package(self,id,status,summary)
+
+    def _toUTF( self, txt ):
+        rc=""
+        if isinstance(txt,types.UnicodeType):
+            return txt
+        else:
+            try:
+                rc = unicode( txt, 'utf-8' )
+            except UnicodeDecodeError, e:
+                rc = unicode( txt, 'iso-8859-1' )
+            return rc
+
+
     def doLock(self):
         ''' Lock Yum'''
         retries = 0
diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index 9c38a9e..e0285ef 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
 <at>  <at>  -157,7 +157,6  <at>  <at>  class PackageKitBaseBackend:
          <at> param id: The package ID name, e.g. openoffice-clipart;2.6.22;ppc64;fedora
          <at> param summary: The package Summary
         '''
-        summary = self._toUTF(summary)
         print >> sys.stdout,"package\t%s\t%s\t%s" % (status,id,summary)

     def status(self,state):
 <at>  <at>  -193,7 +192,6  <at>  <at>  class PackageKitBaseBackend:
          <at> param bytes: The size of the package, in bytes
          <at> param file_list: List of the files in the package, separated by ';'
         '''
-        desc = self._toUTF(desc)
         print >> sys.stdout,"description\t%s\t%s\t%s\t%s\t%s\t%ld\t%s" % (id,licence,group,desc,url,bytes,file_list)

     def files(self, id, file_list):
 <at>  <at>  -257,19 +255,7  <at>  <at>  class PackageKitBaseBackend:
             containing (name,ver,arch,data)
         '''
         return tuple(id.split(';', 4))
-        
-
-    def _toUTF( self, txt ):
-        rc=""
-        if isinstance(txt,types.UnicodeType):
-            return txt
-        else:
-            try:
-                rc = unicode( txt, 'utf-8' )
-            except UnicodeDecodeError, e:
-                rc = unicode( txt, 'iso-8859-1' )
-            return rc
-        
+       
 #
 # Backend Action Methods
 #
commit 5ef2114adeaf90805dde45da70fecaff7bc83f6e
Author: S.Çağlar Onur <caglar@...>
Date:   Thu Nov 1 09:47:37 2007 +0200

    PiSi: implement search_group and get_group

diff --git a/backends/pisi/helpers/Makefile.am b/backends/pisi/helpers/Makefile.am
index b9eef2f..d657cc1 100644
--- a/backends/pisi/helpers/Makefile.am
+++ b/backends/pisi/helpers/Makefile.am
 <at>  <at>  -17,6 +17,7  <at>  <at>  dist_helper_DATA = 			\
 	resolve.py			\
 	repo-set-data.py		\
 	search-file.py			\
+	search-group.py			\
 	search-name.py			\
 	update.py			\
 	update-system.py		\
diff --git a/backends/pisi/helpers/pisiBackend.py b/backends/pisi/helpers/pisiBackend.py
index 9e2e9de..9ba6999 100644
--- a/backends/pisi/helpers/pisiBackend.py
+++ b/backends/pisi/helpers/pisiBackend.py
 <at>  <at>  -23,6 +23,81  <at>  <at>  from packagekit.backend import *

 class PackageKitPisiBackend(PackageKitBaseBackend):

+    # It's an ugly way to sync with PK Groups and PiSi Components
+    # Maybe we can provide these with our index?
+    groups = {
+            "applications" : GROUP_UNKNOWN,
+            "applications.admin" : GROUP_ADMIN_TOOLS,
+            "applications.archive" : GROUP_UNKNOWN,
+            "applications.crypto" : GROUP_SECURITY,
+            "applications.doc" : GROUP_PUBLISHING,
+            "applications.doc.docbook" : GROUP_PUBLISHING,
+            "applications.editors" : GROUP_ACCESSORIES,
+            "applications.editors.emacs" : GROUP_ACCESSORIES,
+            "applications.emulators" : GROUP_UNKNOWN,
+            "applications.filesystems" : GROUP_UNKNOWN,
+            "applications.games" : GROUP_GAMES,
+            "applications.hardware" : GROUP_UNKNOWN,
+            "applications.multimedia" : GROUP_MULTIMEDIA,
+            "applications.network" : GROUP_INTERNET,
+            "applications.network.mozilla" : GROUP_INTERNET,
+            "applications.pda" : GROUP_ACCESSORIES,
+            "applications.powermanagement" : GROUP_UNKNOWN,
+            "applications.printing" : GROUP_PUBLISHING,
+            "applications.science" : GROUP_EDUCATION,
+            "applications.science.astronomy" : GROUP_EDUCATION,
+            "applications.science.electronics" : GROUP_EDUCATION,
+            "applications.science.mathematics" : GROUP_EDUCATION,
+            "applications.security" : GROUP_SECURITY,
+            "applications.shells" : GROUP_UNKNOWN,
+            "applications.tex" : GROUP_PUBLISHING,
+            "applications.util" : GROUP_ACCESSORIES,
+            "applications.virtualization" : GROUP_VIRTUALIZATION,
+            "desktop.fonts" : GROUP_FONTS,
+            "desktop.freedesktop" : GROUP_DESKTOPS,
+            "desktop.freedesktop.inputmethods" : GROUP_LOCALIZATION,
+            "desktop.freedesktop.xorg" : GROUP_DESKTOPS,
+            "desktop.freedesktop.xorg.lib" : GROUP_DESKTOPS,
+            "desktop.gnome" : GROUP_DESKTOPS,
+            "desktop.kde" : GROUP_DESKTOPS,
+            "desktop.kde.base" : GROUP_DESKTOPS,
+            "desktop.kde.i18n" : GROUP_LOCALIZATION,
+            "kernel" : GROUP_SYSTEM,
+            "kernel.drivers" : GROUP_SYSTEM,
+            "kernel.firmware" : GROUP_SYSTEM,
+            "kernel-xen" : GROUP_VIRTUALIZATION,
+            "kernel-xen.dom0" : GROUP_VIRTUALIZATION,
+            "kernel-xen.dom0.drivers" : GROUP_VIRTUALIZATION,
+            "kernel-xen.dom0.firmware" : GROUP_VIRTUALIZATION,
+            "kernel-xen.domU" : GROUP_VIRTUALIZATION,
+            "programming" : GROUP_PROGRAMMING,
+            "programming.environments" : GROUP_PROGRAMMING,
+            "programming.environments.eclipse" : GROUP_PROGRAMMING,
+            "programming.languages" : GROUP_PROGRAMMING,
+            "programming.languages.dotnet" : GROUP_PROGRAMMING,
+            "programming.languages.gambas" : GROUP_PROGRAMMING,
+            "programming.languages.haskell" : GROUP_PROGRAMMING,
+            "programming.languages.java" : GROUP_PROGRAMMING,
+            "programming.languages.lisp" : GROUP_PROGRAMMING,
+            "programming.languages.pascal" : GROUP_PROGRAMMING,
+            "programming.languages.perl" : GROUP_PROGRAMMING,
+            "programming.languages.php" : GROUP_PROGRAMMING,
+            "programming.languages.python" : GROUP_PROGRAMMING,
+            "programming.languages.tcl" : GROUP_PROGRAMMING,
+            "programming.libs" : GROUP_PROGRAMMING,
+            "programming.tools" : GROUP_PROGRAMMING,
+            "server" : GROUP_SERVERS,
+            "server.database" : GROUP_SERVERS,
+            "server.mail" : GROUP_SERVERS,
+            "server.nis" : GROUP_SERVERS,
+            "server.www" : GROUP_SERVERS,
+            "system" : GROUP_SYSTEM,
+            "system.base" : GROUP_SYSTEM,
+            "system.devel" : GROUP_PROGRAMMING,
+            "system.doc" : GROUP_SYSTEM,
+            "system.locale" : GROUP_LOCALIZATION
+        }
+
     def __init__(self, args):
         PackageKitBaseBackend.__init__(self, args)

 <at>  <at>  -32,6 +107,10  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):
         self.packagedb = pisi.db.packagedb.PackageDB()
         self.repodb = pisi.db.repodb.RepoDB()

+        # Do not ask any question to users
+        self.options = pisi.config.Options()
+        self.options.yes_all = True
+
     def __get_package_version(self, package):
         """ Returns version string of given package """
         # Internal FIXME: PiSi may provide this
 <at>  <at>  -52,7 +131,7  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):
         else:
             self.error(ERROR_INTERNAL_ERROR, "Package was not found")

-        if filters:
+        if filters or "none" not in filters:
             filterlist = filters.split(';')

             if FILTER_INSTALLED in filterlist and status != INFO_INSTALLED:
 <at>  <at>  -86,9 +165,15  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):

         if self.packagedb.has_package(package):
             pkg = self.packagedb.get_package(package)
+
+            if self.groups.has_key(pkg.partOf):
+                group = self.groups[pkg.partOf]
+            else:
+                group = GROUP_UNKNOWN
+
             self.description("%s-%s" % (pkg.name, self.__get_package_version(pkg)),
                             pkg.license,
-                            pkg.partOf,
+                            group,
                             pkg.description,
                             pkg.packageURI,
                             pkg.packageSize, "")
 <at>  <at>  -104,15 +189,13  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):

         if self.installdb.has_package(package):
             pkg = self.installdb.get_files(package)
-            
+
             # FIXME: Add "/" as suffix
             files = map(lambda y: y.path, pkg.list)

             file_list = ";".join(files)

             self.files(package, file_list)
-        else:
-            self.error(ERROR_INTERNAL_ERROR, "Package was not found")

     def get_repo_list(self):
         """ Prints available repositories """
 <at>  <at>  -260,6 +343,19  <at>  <at>  class PackageKitPisiBackend(PackageKitBaseBackend):
         for pkg, files in pisi.api.search_file(key):
             self.__get_package(pkg)

+    def search_group(self, filters, group):
+        """ Prints a list of packages contains search term """
+        self.allow_interrupt(True)
+        self.percentage(None)
+
+        try:
+            for key in self.groups.keys():
+                if self.groups[key] == group:
+                    for pkg in self.componentdb.get_packages(key, walk = True):
+                        self.__get_package(pkg, filters)
+        except:
+            self.error(ERROR_INTERNAL_ERROR, "Component %s was not found" % group)
+
     def search_name(self, filters, package):
         """ Prints a list of packages contains search term """
         self.allow_interrupt(True)
diff --git a/backends/pisi/helpers/search-group.py b/backends/pisi/helpers/search-group.py
new file mode 100644
index 0000000..064149b
--- /dev/null
+++ b/backends/pisi/helpers/search-group.py
 <at>  <at>  -0,0 +1,19  <at>  <at> 
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2007 S.Çağlar Onur <caglar@...>
+#
+# Licensed under the GNU General Public License Version 2
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+import sys
+import pisiBackend
+
+backend = pisiBackend.PackageKitPisiBackend(sys.argv[1:])
+backend.search_group(sys.argv[1], sys.argv[2])
+
+sys.exit()
diff --git a/backends/pisi/pk-backend-pisi.c b/backends/pisi/pk-backend-pisi.c
index 0aa410e..2af9f50 100644
--- a/backends/pisi/pk-backend-pisi.c
+++ b/backends/pisi/pk-backend-pisi.c
 <at>  <at>  -24,6 +24,38  <at>  <at> 
 #include <pk-backend-python.h>

 /**
+ * backend_get_groups:
+ */
+static void
+backend_get_groups (PkBackend *backend, PkEnumList *elist)
+{
+	g_return_if_fail (backend != NULL);
+	pk_enum_list_append_multiple (elist,
+				         /* PK_GROUP_ENUM_ACCESSIBILITY, */
+				         PK_GROUP_ENUM_ACCESSORIES,
+				         PK_GROUP_ENUM_EDUCATION,
+				         PK_GROUP_ENUM_GAMES,
+				         /* PK_GROUP_ENUM_GRAPHICS, */
+				         PK_GROUP_ENUM_INTERNET,
+				         /* PK_GROUP_ENUM_OFFICE, */
+				         /* PK_GROUP_ENUM_OTHER, */
+				         PK_GROUP_ENUM_PROGRAMMING,
+				         PK_GROUP_ENUM_MULTIMEDIA,
+				         PK_GROUP_ENUM_SYSTEM,
+				         PK_GROUP_ENUM_DESKTOPS,
+				         PK_GROUP_ENUM_PUBLISHING,
+				         PK_GROUP_ENUM_SERVERS,
+				         PK_GROUP_ENUM_FONTS,
+				         PK_GROUP_ENUM_ADMIN_TOOLS,
+				         /* PK_GROUP_ENUM_LEGACY, */
+				         PK_GROUP_ENUM_LOCALIZATION,
+				         PK_GROUP_ENUM_VIRTUALIZATION,
+				         PK_GROUP_ENUM_SECURITY,
+				         PK_GROUP_ENUM_UNKNOWN,
+				         -1);
+}
+
+/**
  * backend_get_filters:
  */
 static void
 <at>  <at>  -42,7 +74,7  <at>  <at>  PK_BACKEND_OPTIONS (
 	"S.Çağlar Onur <caglar@...>",		/* author */
 	NULL,						/* initalize */
 	NULL,						/* destroy */
-	NULL,						/* get_groups */
+	backend_get_groups,				/* get_groups */
 	backend_get_filters,				/* get_filters */
 	pk_backend_python_cancel,			/* cancel */
 	pk_backend_python_get_depends,			/* get_depends */
 <at>  <at>  -59,7 +91,7  <at>  <at>  PK_BACKEND_OPTIONS (
 	NULL,						/* rollback */
 	NULL,						/* search_details */
 	pk_backend_python_search_file,			/* search_file */
-	NULL,						/* search_group */
+	pk_backend_python_search_group,			/* search_group */
 	pk_backend_python_search_name,			/* search_name */
 	pk_backend_python_update_package,		/* update_package */
 	pk_backend_python_update_system,		/* update_system */
diff --git a/html/pk-faq.html b/html/pk-faq.html
index ff4c7b0..82a7849 100644
--- a/html/pk-faq.html
+++ b/html/pk-faq.html
 <at>  <at>  -32,7 +32,7  <at>  <at>  update-system     |   X    |  X  |     |  X  |      |   X   |   X  |
 search-name       |   X    |  X  |  X  |  X  |  X   |   X   |   X  |
 search-details    |        |  X  |  X  |  X  |      |       |      |
 search-file       |        |  X  |     |  X  |      |       |   X  |
-search-group      |        |  X  |     |     |      |       |      |
+search-group      |        |  X  |     |     |      |       |   X  |
 install-package   |   X    |  X  |     |  X  |  X   |   X   |   X  |
 install-file      |        |  X  |     |  X  |      |       |   X  |
 remove-package    |   X    |  X  |     |  X  |  X   |   X   |   X  |
Richard Hughes | 1 Nov 21:29 2007
Picon

Re: Export GROUP_UNKNOWN to backends

On Thu, 2007-11-01 at 10:37 +0200, S.Çağlar Onur wrote:
> 01 Kas 2007 Per tarihinde, Tim Lauridsen şunları yazmıştı: 
> > Do we need a GROUP_UNKNOWN ???
> >
> > Uncategorised packages should go into GROUP_OTHER or in no groups at all
> 
> I think we need, PiSi uses GROUP_OTHER for uncategories ones (so GROUP_OTHER 
> is really a group for us) and GROUP_UNKNOWN as a failover. Cause backend has 
> hardcoded PiSi Component <-> PK Group map but components can be added our 
> repository virtually which makes imposibble to sync with PK at all.

Yes, agreed. We shouldn't show Unknown in the group list, just in the
package description. I've pushed
4b29d9d9a0cae97f7adfce847c6e419ed598c28d to make this so.

Richard.

_______________________________________________
PackageKit mailing list
PackageKit <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/packagekit
Richard Hughes | 1 Nov 21:30 2007
Picon

Re: YUM backend problems

On Thu, 2007-11-01 at 10:26 +0100, Tim Lauridsen wrote:
> I also fixed an issue in refresh-cache so it will read the group 
> metadata & made search-group only look in the cache.

Excellent, thanks.

Richard.

Richard Hughes | 1 Nov 22:00 2007
Picon

Re: Status of x86_64 support?

On Thu, 2007-11-01 at 08:58 +0100, Matej Cepl wrote:
> On 2007-10-31, 21:33 GMT, Richard Hughes wrote:
> > On Wed, 2007-10-31 at 22:13 +0100, Matej Cepl wrote:
> >> Any ideas?
> >
> > Ahh, the automated fd.o push failed. Can you try now pls.
> 
> Output of packagekitd is 
> http://www.ceplovi.cz/matej/tmp/packagekitd-log.txt
> No output was produced in gnome-terminal when running
> pkcon search name gstramer-plugin
> pk-update-icon switched to „Setting up (Cancelling)“ and when 
> I cliecked on Refresh package list (or whatever is the name) 
> bug-buddy got interested with the result seen on 
> http://www.ceplovi.cz/matej/tmp/pk-update-icon-bugreport.txt

Ahh, a different error. I think I've fixed this also just now - I
certainly can't get the tools to crash when I force
<allow_active>no</allow_active>

The question is, why do you get policykit denied errors? What does
polkit-list-actions say?

Richard.

_______________________________________________
PackageKit mailing list
PackageKit <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/packagekit

Gmane