Bug 178334

Summary: refreshing of zypp source does not work in zen
Product: [openSUSE] SUSE Linux 10.1 Reporter: Andreas Jaeger <aj>
Component: ZenworksAssignee: Klaus Kämpf <kkaempf>
Status: RESOLVED FIXED QA Contact: Mauro Parra Miranda <mauro>
Severity: Blocker    
Priority: P5 - None CC: dmacvicar, hmuelle, kkaempf, suse-beta
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Andreas Jaeger 2006-05-24 12:58:36 UTC
It seems that rug refresh does not refresh a zypp source.

I just run rug refresh and still see:
l cache/Source.plreWr/repodata/
total 124
 drwx------ 2 root root  4096 2006-05-23 10:58 ./
 drwxr-xr-x 3 root root  4096 2006-05-23 10:58 ../
 -rw-r--r-- 1 root root 10547 2006-05-23 10:58 filelists.xml.gz
 -rw-r--r-- 1 root root  4612 2006-05-23 10:58 patch-avahi-1399.xml
 -rw-r--r-- 1 root root  6097 2006-05-23 10:58 patch-dhcdbd-1315.xml
[...]

Those are old and not updated.
Comment 1 James Willcox 2006-05-24 22:42:58 UTC
zmd simply removes the catalog and then calls parse-metadata, so if there is something not getting updated it's in the helper.
Comment 2 Wolfgang Rosenauer 2006-05-26 06:20:08 UTC
I think I've observed that rug refresh works if the ZYPP metadata is already up-to-date (for example because of a yast2 online_update run).
But the ZYPP metadata itself is not refreshed by rug refresh.
Comment 4 Duncan Mac-Vicar 2006-05-29 09:03:36 UTC
Reading a source in zypp does not download anything unless cache does not exist or you call store metadata to reread from the URL to the local cache.

Comment 5 Klaus Kämpf 2006-05-30 12:15:22 UTC
How is refresh implemented in YaST ?
The helpers should use the same implementation.
Comment 6 Stanislav Visnovsky 2006-05-31 06:23:37 UTC
YaST Online update calls SourceRefreshNow() for all sources with autorefresh enabled, which in turn calls Source::refresh().
Comment 7 Klaus Kämpf 2006-05-31 11:29:29 UTC
When is this call executed ?
Every time YaST Online Update starts ?

Is a call to Source::refresh() equivalent to storeMetadata() as proposed by Duncan ?
Comment 8 Klaus Kämpf 2006-05-31 11:46:44 UTC
Whats the autorefresh default for newly created (via libzypp API) sources ? On or Off ?
Comment 9 Klaus Kämpf 2006-05-31 12:06:15 UTC
submitted libzypp-zmd-backend to stable with the following limitations:

- it refreshes every time 'parse-metadata' is called by ZMD
  (which is done frequently when zmd is active)
- the refresh is limited to 'remote' sources. Refreshing a CD
  doesn't make sense, but refreshing from a local directory or
  an NFS server might be appropriate.
Comment 10 Andreas Jaeger 2006-05-31 12:29:18 UTC
With that refreshes we need duncan's Code as well that only downloads if something has changed.
Comment 13 Stanislav Visnovsky 2006-06-01 09:15:03 UTC
YaSt does refresh based on autorefresh attribute of a source (so user can force a directory to be refreshed as well), but otherwise, it's OK.