Libzypp/ZMD/YaST
ZMD/YaST Interface
Adding the installation catalog
Adding the update catalog(s) to ZMD
Adding the update catalog(s) to YaST
The following Bugs also contain information about (or relate to) ZMD/YaST: 156030 160069(fixed) 160319(dupl 156030) 160402
Facts
- Addition/Removal of catalogs must be done via zmd (rug)
- Addition/Removal of repositories must be done via zypp (yast)
- zmd can only handle ftp/http repositories, all others (cd, dvd, nfs, ...) must be handled by zypp
- A (zypp) repository is identified by its URI(cd://, dvd://,...) and a (product) name
- A (zmd) catalog is identified by its URL
Implication
- Catalogs and repositories are essentially identical, just two names depending on the tool (zmd or zypp)
- For zmd the URL must be unique, this makes zypp URIs like cd:// impossible to handle.
- Catalogs added via zmd must be synched back to zypp
- Zmd calls parse-metadata which does the check and eventually adds the catalog to zypp
- Problem: The catalog appears local to the parse-metadata helper, so the correct URL can't be passed to zypp.
- Zmd calls parse-metadata which does the check and eventually adds the catalog to zypp
- Repositiories added via zypp must be synced back to zmd
- YaST Install/Delete install source will call rug sa/rug sd
- zmd can only handle ftp and http, everything is treated as local and handled by zypp.
Conclusion/Solution
- yast add/remove installation source must call rug sa/rug sd in order to inform zmd
- the URI passed via rug must be unique
- for ftp/http sources, a correct URI must be passed since zmd downloads metadata
- for other URIs, the real URI can be encoded in order to make it unique
- Solution: Add the zypp alias as cd://?alias=alias to make the URI unique
- zmd should inform zypp about added/removed catalog. Since zmd does not directly link to zypp, this must be done be a helper
- for added catalogs, parse-metadata will be called
- the real URI must be passed to parse-metadata
- for removed catalogs, service-delete will be called
In a meeting Jose Mercado and Klaus Kaempf agreed that some kind of control flow between libzypp and ZMD is needed.
Jose proposed to enhance the existing XML/RPC interface with functions for
- start transaction (while zypp doing rpm stuff, zmd shouldn't refresh its cache)
- stop transaction (when zypp is done with rpm, zmd should refresh its cache)
- add source (when a new installation source is added via yast, it must be synched with zmd)
- remove source (when an installation source is removed via yast, it must be synched with zmd)
Last edit in Trac '04/05/06 09:53:11' by 'kkaempf'