]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
implement distver variable
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Sat, 11 Oct 2008 11:01:31 +0000 (11:01 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Sat, 11 Oct 2008 11:01:31 +0000 (11:01 +0000)
tools/repo_products.c

index c98ffe486e88cd0e446e728b50e8f2eedb7ad9b2..deb7d24645caba519a653722c9d835222cb1ad11 100644 (file)
@@ -273,6 +273,15 @@ endElement(void *userData, const char *name)
       if (pd->currentproduct == pd->baseproduct)
        repodata_set_str(pd->data, pd->handle, PRODUCT_TYPE, "base");
 
+      // output distver if requested, only if the product is
+      // a base product
+      if (pd->currentproduct == pd->baseproduct
+         && pd->attribute
+         && !strcmp(pd->attribute, "distver"))
+       {
+         printf("%s\n", pd->tmpvers);
+       }
+
       if (pd->tmprel)
        {
          if (pd->tmpvers)