[zypp-devel] Repository Metadata

Hi, I wanted to know if it would be possible to get the repository metadata without the root user and without refreshing the repository. I have currently implemented it by refreshing the metadata in /tmp, but it takes a lot of time, and is probably not suitable for a GUI application. What would be the best solution in this case? Regards,. Saurabh -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org

On Sunday 05 August 2012 14:00:08 Saurabh Sood wrote:
Hi, I wanted to know if it would be possible to get the repository metadata without the root user and without refreshing the repository.
'Refreshing' means to get the latest set of package metadata provided by the repo to your local disk. So you need to refresh and for this you need to be able to: * access the repo media * write to the local metadata cache As non-root user it depends on the media whether you can access it or not. Mountable media (iso,nfs,hd,cd,cifs,..) are usually not accessible because only root is allowed to mount. For local repsitories (dir) it depends on the directories filesystem permissions. Downloading media (ftp,http) are usually accessible (provoided you know the credentials if needed). As non-root user you usually can't write to the system cache below /var/cache/zypp. You can set up a RepoManager with repoRawCachePath and repoSolvCachePath redirected to some writable tempdir, but this also leads to zypp downloading all repos again unless you preload the trees (at least the raw tree) with data from the system cache..... But actually you don't want your code to depend on how zypp treats its cache. The only clean solution is to support non-root repo refresh in libzypp, provided the media is accessible. I'll think about it.
I have currently implemented it by refreshing the metadata in /tmp, but it takes a lot of time, and is probably not suitable for a GUI application. What would be the best solution in this case?
If you do not refresh your metadata, you 'see' the servers content as it was the last time you did a refresh. Any transaction you compute is based on your local data. So the bad things which can happen if your metadata are old are: * dependency resolution errors because you do not see the newly arrived packages/updates on the server which would solve the problem. * download errors because a package you want to install is no longer available on the server. Whether this is ok or not depends on your expectations. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org To contact the owner, e-mail: zypp-devel+owner@opensuse.org
participants (2)
-
Michael Andres
-
Saurabh Sood