]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add comments to explain the whatprovidesaux a bit
authorMichael Schroeder <mls@suse.de>
Tue, 29 Jul 2025 11:21:34 +0000 (13:21 +0200)
committerMichael Schroeder <mls@suse.de>
Tue, 29 Jul 2025 11:21:34 +0000 (13:21 +0200)
src/poolwhatprovides.c

index 07e6bce7925294ee3cbac21576977ac9e02265b5..32098944a5337b5dc95b87f088d7e8f5d882d715 100644 (file)
@@ -279,7 +279,7 @@ pool_createwhatprovides(Pool *pool)
              whatprovides[id]--;
            }
          else
-           auxid = 1;
+           auxid = 1;          /* we have multiple provides for this name */
          if (whatprovidesauxdata)
            whatprovidesauxdata[whatprovides[id]] = auxid;
        }
@@ -898,7 +898,7 @@ pool_addrelproviders(Pool *pool, Id d)
          Solvable *s = pool->solvables + p;
          if (ppaux)
            {
-             pid = *ppaux++;
+             pid = *ppaux++;   /* the id that provided the name, 1 if there are multiple providers */
              if (pid && pid != 1)
                {
 #if 0
@@ -907,7 +907,7 @@ pool_addrelproviders(Pool *pool, Id d)
                  if (!ISRELDEP(pid))
                    {
                      if (pid != name)
-                       continue;               /* wrong provides name */
+                       continue;               /* wrong provides name (should not happen) */
                      if (pool->disttype == DISTTYPE_DEB)
                        continue;               /* unversioned provides can never match versioned deps */
                    }