From c32471f9a33fa8bc6d86d8b7dbe86f9b22f16b10 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Sat, 11 Oct 2008 11:01:31 +0000 Subject: [PATCH] implement distver variable --- tools/repo_products.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/repo_products.c b/tools/repo_products.c index c98ffe4..deb7d24 100644 --- a/tools/repo_products.c +++ b/tools/repo_products.c @@ -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) -- 2.7.4