[packagekit] [RFC] Refresh Cache

Tim Lauridsen tla at rasmil.dk
Fri Oct 26 04:18:30 PDT 2007


S.Çag(lar Onur wrote:
> 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
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>   
Something must be wrong in the doc.
'refresh-cache' should fetch the metedata from the repositories.

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20071026/160cdc34/attachment-0004.htm>


More information about the PackageKit mailing list