remove obsolete states, add support for product type, fix flags parsing
[platform/upstream/libsolv.git] / ext / repo_products.c
index 598b2ab..4609ceb 100644 (file)
@@ -324,7 +324,7 @@ endElement(void *userData, const char *name)
       repodata_set_str(pd->data, pd->handle, PRODUCT_REGISTER_RELEASE, pd->content);
       break;
     case STATE_CPEID:
-      if (pd->content)
+      if (*pd->content)
         repodata_set_str(pd->data, pd->handle, SOLVABLE_CPEID, pd->content);
     default:
       break;
@@ -384,7 +384,7 @@ add_code11_product(struct parsedata *pd, FILE *fp)
   else
     {
       pd->currentproduct = pd->baseproduct + 1; /* make it != baseproduct if stat fails */
-      perror("fstat");
+      pool_error(pd->pool, 0, "fstat: %s", strerror(errno));
       pd->ctime = 0;
     }
 
@@ -461,7 +461,7 @@ repo_add_code11_products(Repo *repo, const char *dirpath, int flags)
          fp = fopen(fullpath, "r");
          if (!fp)
            {
-             perror(fullpath);
+             pool_error(repo->pool, 0, "%s: %s", fullpath, strerror(errno));
              continue;
            }
          pd.filename = fullpath;