From: Klaus Kaempf Date: Wed, 13 Aug 2008 16:06:31 +0000 (+0000) Subject: provide solvable:installtime for product solvables X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=962af956632557d98a5b8ac1f2f73657852e73a7;p=thirdparty%2Flibsolv.git provide solvable:installtime for product solvables --- diff --git a/tools/repo_products.c b/tools/repo_products.c index e2e69c91..1c9757d3 100644 --- a/tools/repo_products.c +++ b/tools/repo_products.c @@ -12,6 +12,8 @@ */ #include +#include +#include #include #include #include @@ -232,9 +234,19 @@ repo_add_product(struct parsedata *pd, Repodata *data, FILE *fp) { if (!s) { + struct stat st; + s = pool_id2solvable(pool, repo_add_solvable(repo)); repodata_extend(data, s - pool->solvables); handle = repodata_get_handle(data, s - pool->solvables - repo->start); + if (!fstat(fileno(fp), &st)) + { + repodata_set_num(data, handle, SOLVABLE_INSTALLTIME, st.st_ctime); + } + else + { + perror("Can't stat()"); + } } if (!strcmp(key, "name")) s->name = str2id(pool, join(pd, "product", ":", value), 1);