[packagekit] [RFC] Refresh Cache

S.Çağlar Onur caglar at pardus.org.tr
Fri Oct 26 04:11:26 PDT 2007


Hi;

PK reference says following for Refresh Cache method;

"This should search for files. This should allow an application to find out 
what package owns a file on the system."


But if i'm not wrong nearly all backends implements this function for 
online-index updating. 

Currently PiSi backend implements Refresh Cache as a "Update repository 
database" function which fetchs new repository index from our package 
repository also.

caglar at zangetsu ~ $ LC_ALL=C pisi help ur
update-repo (ur): Update repository databases

Usage: update-repo [<repo1> <repo2> ... <repon>]

<repoi>: repository name

Synchronizes the PiSi databases with the current repository.
If no repository is given, all repositories are updated.


But PiSi has a function called search-file which loads its entire installed 
packages database and let the user find the specific package which contains 
the searched file, too

caglar at zangetsu ~ $ LC_ALL=C pisi sf /usr/bin/ls
Searching for /usr/bin/ls
Package coreutils has file /bin/ls



So here are the questions :)

1. What is the real purpose of Refresh Cache in PK? 

2. How other backends behaves?

3. If PiSi backend doing the right thing, do you think a privilege 
called "org.freedesktop.packagekit.refresh-cache" is needed or not (i have 
working on a patch for this, if needed) cause updating the repository cache 
seems not a normal user's job to me.

 libpackagekit/pk-client.c |   59 ++++++++++++++++++++++++++++++++------------
 policy/packagekit.policy  |    9 ++++++-
 src/pk-engine.c           |   35 +++++++++++++++++---------
 src/pk-engine.h           |    3 +-
 src/pk-security-polkit.c  |    2 +
 5 files changed, 78 insertions(+), 30 deletions(-)

4. If PiSi backend behaves wrongly, how should i implement Refresh Cache and 
also which method is suitable for "Update Repository" action (maybe 
Update?) ?

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

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20071026/3d94e0ee/attachment-0004.pgp>


More information about the PackageKit mailing list