Libzypp/ZMD/ZMD7.1/helpers/parse-metadata

< Libzypp‎ | ZMD‎ | ZMD7.1‎ | helpers
Şuraya atla: kullan, ara

parse-metadata

On the second thought I think it's a bad idea to have another parser for our metadata in zmd. We already need to add another helper for the installation source. Let's just use the one in zypp. So with each YUM service (ours or standard), zmd makes sure to download all metadata files and invoke a helper which parses the files. Here's the full description:

rug sa --type=yum url "Name for the catalog"
  • zmd creates a new service and a catalog.
  • zmd downloads url/repodata/repomd.xml.
  • zmd parses the repomd.xml and downloads all other metadata files.
  • zmd calls a helper which has the following syntax:
parse-metadata <database> <type> <uri> <path> <catalog id>

metadata type can be currently either 'yum' or 'zypp'.

For type yum, path would be the path on the local file system.

For type zypp, path is fixed to /installation. This triggers the uploading of the initial installation catalog data to the sqlite database. See Adding the initial catalog.

Here's an example for type yum:

parse-metadata zmd.db yum /var/cache/zmd/foo/ 2332523

The helper is guaranteed to find /var/cache/zmd/foo/repodata/repomd.xml and all the other files referenced from the repomd.xml. For example, if the repomd.xml has

<location href="repodata/primary.xml"/>

then the file is locally at /var/cache/zmd/foo/repodata/primary.xml.

The helper would parse all metadata, and write all resolvables to the database, using the catalog id as a catalog for the resolvables.

At refresh, zmd would remove the catalog from the database, triggering the removal of all resolvables which which have the same catalog id, re-download all metadata (if needed) and call the helper the same way.

package_details.package_url will be added and it should be set by the helper without the base url so that the daemon could construct the full path from url + "/" + package_details.package_url. After downloading the package, zmd fills in package_details.package_filename with the full path on the local file system.

Key and Digest callbacks

When parsing a new repository, zypp checks for signing and signals mismatches via callbacks.

Bug 173920 explains the API.


back ...

Last edit in Trac '05/18/06 11:15:55' by 'kkaempf'


Last edit in Trac '05/18/06 11:15:55' by 'kkaempf'


Last edit in Trac '05/18/06 11:15:55' by 'kkaempf'


Last edit in Trac '05/18/06 11:15:55' by 'kkaempf'