Hello community,

here is the log from the commit of package libsolv for openSUSE:Factory checked 
in at 2014-01-29 07:16:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libsolv (Old)
 and      /work/SRC/openSUSE:Factory/.libsolv.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libsolv"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libsolv/libsolv.changes  2014-01-27 
15:29:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libsolv.new/libsolv.changes     2014-01-29 
07:16:09.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Jan 27 17:15:41 CET 2014 - [email protected]
+
+- add support for autogenerated products
+- support repoid array in product definition
+- bump version to 0.4.3
+
+-------------------------------------------------------------------

Old:
----
  libsolv-0.4.2.tar.bz2

New:
----
  libsolv-0.4.3.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libsolv.spec ++++++
--- /var/tmp/diff_new_pack.szE6Kv/_old  2014-01-29 07:16:10.000000000 +0100
+++ /var/tmp/diff_new_pack.szE6Kv/_new  2014-01-29 07:16:10.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           libsolv
-Version:        0.4.2
+Version:        0.4.3
 Release:        0
 Url:            git://gitorious.org/opensuse/libsolv.git
 Source:         libsolv-%{version}.tar.bz2

++++++ libsolv-0.4.2.tar.bz2 -> libsolv-0.4.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.4.2/VERSION.cmake 
new/libsolv-0.4.3/VERSION.cmake
--- old/libsolv-0.4.2/VERSION.cmake     2014-01-24 14:03:41.000000000 +0100
+++ new/libsolv-0.4.3/VERSION.cmake     2014-01-27 17:15:52.000000000 +0100
@@ -49,5 +49,5 @@
 
 SET(LIBSOLV_MAJOR "0")
 SET(LIBSOLV_MINOR "4")
-SET(LIBSOLV_PATCH "2")
+SET(LIBSOLV_PATCH "3")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.4.2/ext/repo_autopattern.c 
new/libsolv-0.4.3/ext/repo_autopattern.c
--- old/libsolv-0.4.2/ext/repo_autopattern.c    2013-12-13 14:51:43.000000000 
+0100
+++ new/libsolv-0.4.3/ext/repo_autopattern.c    2014-01-27 16:30:52.000000000 
+0100
@@ -61,37 +61,59 @@
   Pool *pool = repo->pool;
   Repodata *data = 0;
   Solvable *s, *s2;
-  Queue q, q2;
+  Queue patq, patq2;
+  Queue prdq, prdq2;
   Id p;
-  Id pattern_id;
-  Id autopattern_id = 0;
+  Id pattern_id, product_id;
+  Id autopattern_id = 0, autoproduct_id = 0;
   int i, j;
 
-  queue_init(&q);
-  queue_init(&q2);
+  queue_init(&patq);
+  queue_init(&patq2);
+  queue_init(&prdq);
+  queue_init(&prdq2);
 
   pattern_id = pool_str2id(pool, "pattern()", 9);
+  product_id = pool_str2id(pool, "product()", 9);
   FOR_REPO_SOLVABLES(repo, p, s)
     {
       const char *n = pool_id2str(pool, s->name);
-      if (!strncmp("pattern:", n, 8))
-       queue_push(&q, p);
-      else if (s->provides)
+      if (*n == 'p')
+       {
+         if (!strncmp("pattern:", n, 8))
+           {
+             queue_push(&patq, p);
+             continue;
+           }
+         else if (!strncmp("product:", n, 8))
+           {
+             queue_push(&prdq, p);
+             continue;
+           }
+       }
+      if (s->provides)
        {
          Id prv, *prvp = repo->idarraydata + s->provides;
          while ((prv = *prvp++) != 0)            /* go through all provides */
            if (ISRELDEP(prv))
              {
                Reldep *rd = GETRELDEP(pool, prv);
-               if (rd->name == pattern_id && rd->flags == REL_EQ)
+               if (rd->flags != REL_EQ)
+                 continue;
+               if (rd->name == pattern_id)
                  {
-                   queue_push2(&q2, p, rd->evr);
+                   queue_push2(&patq2, p, rd->evr);
+                   break;
+                 }
+               if (rd->name == product_id)
+                 {
+                   queue_push2(&prdq2, p, rd->evr);
                    break;
                  }
              }
        }
     }
-  for (i = 0; i < q2.count; i += 2)
+  for (i = 0; i < patq2.count; i += 2)
     {
       const char *pn = 0;
       char *newname;
@@ -99,21 +121,21 @@
       const char *str;
       unsigned long long num;
 
-      s = pool->solvables + q2.elements[i];
+      s = pool->solvables + patq2.elements[i];
       /* construct new name */
-      newname = pool_tmpjoin(pool, "pattern:", pool_id2str(pool, q2.elements[i 
+ 1]), 0);
+      newname = pool_tmpjoin(pool, "pattern:", pool_id2str(pool, 
patq2.elements[i + 1]), 0);
       unescape(newname);
       name = pool_str2id(pool, newname, 0);
       if (name)
        {
          /* check if we already have that pattern */
-         for (j = 0; j < q.count; j++)
+         for (j = 0; j < patq.count; j++)
            {
-             s2 = pool->solvables + q.elements[j];
+             s2 = pool->solvables + patq.elements[j];
              if (s2->name == name && s2->arch == s->arch && s2->evr == s->evr)
                break;
            }
-         if (j < q.count)
+         if (j < patq.count)
            continue;   /* yes, do not add again */
        }
       /* new pattern */
@@ -125,7 +147,7 @@
          data = repo_add_repodata(repo, flags);
        }
       s2 = pool_id2solvable(pool, repo_add_solvable(repo));
-      s = pool->solvables + q2.elements[i];    /* re-calc pointer */
+      s = pool->solvables + patq2.elements[i]; /* re-calc pointer */
       s2->name = name;
       s2->arch = s->arch;
       s2->evr = s->evr;
@@ -201,8 +223,133 @@
            repodata_set_void(data, s2 - pool->solvables, SOLVABLE_ISVISIBLE);
        }
     }
-  queue_free(&q);
-  queue_free(&q2);
+  queue_free(&patq);
+  queue_free(&patq2);
+
+  if (repo == pool->installed)
+    queue_empty(&prdq2);       /* no auto products for installed repos */
+
+  for (i = 0; i < prdq2.count; i += 2)
+    {
+      const char *pn = 0;
+      char *newname;
+      Id name, evr = 0, prv, *prvp;
+      const char *str;
+      unsigned long long num;
+
+      s = pool->solvables + prdq2.elements[i];
+      /* construct new name */
+      newname = pool_tmpjoin(pool, "product(", pool_id2str(pool, 
prdq2.elements[i + 1]), ")");
+      unescape(newname);
+      name = pool_str2id(pool, newname, 0);
+      if (!name)
+       continue;       /* must have it in provides! */
+      prvp = repo->idarraydata + s->provides;
+      while ((prv = *prvp++) != 0)            /* go through all provides */
+       {
+         if (ISRELDEP(prv))
+           {
+             Reldep *rd = GETRELDEP(pool, prv);
+             if (rd->name == name && rd->flags == REL_EQ)
+               {
+                 evr = rd->evr;
+                 break;
+               }
+           }
+       }
+      if (!prv)
+       continue;       /* not found in provides */
+      newname = pool_tmpjoin(pool, "product:", pool_id2str(pool, 
prdq2.elements[i + 1]), 0);
+      unescape(newname);
+      name = pool_str2id(pool, newname, 0);
+      if (name)
+       {
+         /* check if we already have that product */
+         for (j = 0; j < prdq.count; j++)
+           {
+             s2 = pool->solvables + prdq.elements[j];
+             if (s2->name == name && s2->arch == s->arch && s2->evr == evr)
+               break;
+           }
+         if (j < prdq.count)
+           continue;   /* yes, do not add again */
+       }
+      /* new product */
+      if (!name)
+        name = pool_str2id(pool, newname, 1);
+      if (!data)
+       {
+         repo_internalize(repo);       /* to make that the lookups work */
+         data = repo_add_repodata(repo, flags);
+       }
+      if ((num = solvable_lookup_num(s, SOLVABLE_INSTALLTIME, 0)) != 0)
+       continue;               /* eek, not for installed packages, please! */
+      s2 = pool_id2solvable(pool, repo_add_solvable(repo));
+      s = pool->solvables + prdq2.elements[i]; /* re-calc pointer */
+      s2->name = name;
+      s2->arch = s->arch;
+      s2->evr = evr;
+      s2->vendor = s->vendor;
+      /* add link requires */
+      s2->requires = repo_addid_dep(repo, s2->requires, prv, 0);
+      if (!autoproduct_id)
+       autoproduct_id = pool_str2id(pool, "autoproduct()", 1);
+      s2->provides = repo_addid_dep(repo, s2->provides, pool_rel2id(pool, 
autoproduct_id, s->name, REL_EQ, 1), 0);
+      /* add self provides */
+      s2->provides = repo_addid_dep(repo, s2->provides, pool_rel2id(pool, 
s2->name, s2->evr, REL_EQ, 1), 0);
+      if ((num = solvable_lookup_num(s, SOLVABLE_BUILDTIME, 0)) != 0)
+       repodata_set_num(data, s2 - pool->solvables, SOLVABLE_BUILDTIME, num);
+      if ((str = solvable_lookup_str(s, SOLVABLE_SUMMARY)) != 0)
+       repodata_set_str(data, s2 - pool->solvables, SOLVABLE_SUMMARY, str);
+      if ((str = solvable_lookup_str(s, SOLVABLE_DESCRIPTION)) != 0)
+       repodata_set_str(data, s2 - pool->solvables, SOLVABLE_DESCRIPTION, str);
+      if ((str = solvable_lookup_str(s, SOLVABLE_DISTRIBUTION)) != 0)
+       repodata_set_str(data, s2 - pool->solvables, SOLVABLE_DISTRIBUTION, 
str);
+      /* fill in stuff from provides */
+      prvp = repo->idarraydata + s->provides;
+      while ((prv = *prvp++) != 0)            /* go through all provides */
+       {
+         Id evr = 0;
+         if (ISRELDEP(prv))
+           {
+             Reldep *rd = GETRELDEP(pool, prv);
+             if (rd->flags != REL_EQ)
+               continue;
+             prv = rd->name;
+             evr = rd->evr;
+           }
+         pn = pool_id2str(pool, prv);
+         if (strncmp("product-", pn, 8) != 0)
+           continue;
+         newname = 0;
+         if (evr)
+           {
+             newname = pool_tmpjoin(pool, pool_id2str(pool, evr), 0, 0);
+             unescape(newname);
+           }
+         if (!strcmp(pn, "product-label()") && evr)
+           repodata_set_str(data, s2 - pool->solvables, PRODUCT_SHORTLABEL, 
newname);
+         else if (!strcmp(pn, "product-type()") && evr)
+           repodata_set_str(data, s2 - pool->solvables, PRODUCT_TYPE, newname);
+         else if (!strcmp(pn, "product-cpeid()") && evr)
+           repodata_set_str(data, s2 - pool->solvables, SOLVABLE_CPEID, 
newname);
+         else if (!strcmp(pn, "product-flags()") && evr)
+           repodata_add_poolstr_array(data, s2 - pool->solvables, 
PRODUCT_FLAGS, newname);
+         else if (!strcmp(pn, "product-updates-repoid()") && evr)
+           repodata_add_poolstr_array(data, s2 - pool->solvables, 
PRODUCT_UPDATES_REPOID, newname);
+         else if (!strncmp(pn, "product-url(", 12) && evr && pn[12] && pn[13] 
&& strlen(pn + 12) < 32)
+           {
+             char type[34];
+             strcpy(type, pn + 12);
+             type[strlen(type) - 1] = 0;       /* closing ) */
+             repodata_add_poolstr_array(data, s2 - pool->solvables, 
PRODUCT_URL_TYPE, type);
+             repodata_add_poolstr_array(data, s2 - pool->solvables, 
PRODUCT_URL, newname);
+           }
+       }
+    }
+  queue_free(&prdq);
+  queue_free(&prdq2);
+
   if (data && !(flags & REPO_NO_INTERNALIZE))
     repodata_internalize(data);
   else if (!data && !(flags & REPO_NO_INTERNALIZE))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.4.2/ext/repo_products.c 
new/libsolv-0.4.3/ext/repo_products.c
--- old/libsolv-0.4.2/ext/repo_products.c       2013-10-04 11:23:38.000000000 
+0200
+++ new/libsolv-0.4.3/ext/repo_products.c       2014-01-27 16:30:52.000000000 
+0100
@@ -58,6 +58,8 @@
   STATE_TARGET,
   STATE_REGRELEASE,
   STATE_PRODUCTLINE,
+  STATE_REGUPDATES,
+  STATE_REGUPDREPO,
   NUMSTATES
 };
 
@@ -90,6 +92,8 @@
   { STATE_LINGUAS,   "lang",          STATE_LANG,          0 },
   { STATE_REGISTER,  "target",        STATE_TARGET,        1 },
   { STATE_REGISTER,  "release",       STATE_REGRELEASE,    1 },
+  { STATE_REGISTER,  "updates",       STATE_REGUPDATES,    0 },
+  { STATE_REGUPDATES, "repository",   STATE_REGUPDREPO,    0 },
   { NUMSTATES }
 };
 
@@ -218,6 +222,12 @@
     case STATE_URL:
       pd->urltype = pool_str2id(pd->pool, find_attr("name", atts), 1);
       break;
+    case STATE_REGUPDREPO:
+      {
+        const char *repoid = find_attr("repoid", atts);
+       if (repoid && *repoid)
+          repodata_add_poolstr_array(pd->data, pd->handle, 
PRODUCT_UPDATES_REPOID, repoid);
+      }
     default:
       break;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.4.2/package/libsolv.changes 
new/libsolv-0.4.3/package/libsolv.changes
--- old/libsolv-0.4.2/package/libsolv.changes   2014-01-24 14:03:41.000000000 
+0100
+++ new/libsolv-0.4.3/package/libsolv.changes   2014-01-27 17:15:52.000000000 
+0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon Jan 27 17:15:41 CET 2014 - [email protected]
+
+- add support for autogenerated products
+- support repoid array in product definition
+- bump version to 0.4.3
+
+-------------------------------------------------------------------
 Fri Jan 24 13:50:03 CET 2014 - [email protected]
 
 - add -X option to susetags2solv [bnc#860271]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.4.2/src/knownid.h 
new/libsolv-0.4.3/src/knownid.h
--- old/libsolv-0.4.2/src/knownid.h     2014-01-20 11:25:53.000000000 +0100
+++ new/libsolv-0.4.3/src/knownid.h     2014-01-27 16:30:52.000000000 +0100
@@ -263,6 +263,8 @@
 
 KNOWNID(DELTA_LOCATION_BASE,           "delta:locbase"),       /* <location 
xml:base=... > */
 
+KNOWNID(PRODUCT_UPDATES_REPOID,                "product:updates:repoid"),
+
 KNOWNID(ID_NUM_INTERNAL,               0)
 
 #ifdef KNOWNID_INITIALIZE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsolv-0.4.2/tools/rpmdb2solv.c 
new/libsolv-0.4.3/tools/rpmdb2solv.c
--- old/libsolv-0.4.2/tools/rpmdb2solv.c        2013-12-03 13:21:43.000000000 
+0100
+++ new/libsolv-0.4.3/tools/rpmdb2solv.c        2014-01-27 16:46:19.000000000 
+0100
@@ -163,6 +163,7 @@
     pool_set_rootdir(pool, root);
 
   repo = repo_create(pool, "installed");
+  pool_set_installed(pool, repo);
   data = repo_add_repodata(repo, 0);
 
   if (!nopacks)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to