-------------------------------------------------------------------
+Fri Aug 15 15:00:32 CEST 2008 - kkaempf@suse.de
+
+- follow /etc/products.d/baseproduct and mark product as 'base'
+
+-------------------------------------------------------------------
Fri Aug 15 14:26:29 CEST 2008 - kkaempf@suse.de
- Implement pre-code11 fallback for products, parse /etc/*-release
#include "tools_util.h"
#include "repo_content.h"
+
+static ino_t baseproduct = 0;
+
struct parsedata {
Repo *repo;
char *tmp;
if (!fstat(fileno(fp), &st))
{
repodata_set_num(data, handle, SOLVABLE_INSTALLTIME, st.st_ctime);
+ /* this is where <productsdir>/baseproduct points to */
+ if (st.st_ino == baseproduct)
+ repodata_set_str(data, handle, PRODUCT_TYPE, "base");
}
else
{
struct dirent *entry;
char *suffix = code11 ? ".prod" : "-release";
int slen = code11 ? 5 : 8; /* strlen(".prod") : strlen("-release") */
+ struct stat st;
+
+ /* check for <productsdir>/baseproduct on code11 and remember its target inode */
+ if (code11
+ && stat(join2(path, "/", "baseproduct"), &st) == 0) /* follow symlink */
+ {
+ baseproduct = st.st_ino;
+ }
while ((entry = readdir(dir)))
{