]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix distupgrade all packages when there is no installed repo
authorMichael Schroeder <mls@suse.de>
Thu, 19 Oct 2017 12:06:47 +0000 (14:06 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 19 Oct 2017 12:06:47 +0000 (14:06 +0200)
src/rules.c

index b66bf5ffea45c49acf5aa2a479e087db8dfb96a4..f8f072e8cd44788e32fe9baf33c66ee2a33e6afd 100644 (file)
@@ -1876,12 +1876,16 @@ solver_createdupmaps(Solver *solv)
              solv->dupinvolvedmap_all = 1;
              FOR_POOL_SOLVABLES(p)
                {
-                 if (installed && pool->solvables[p].repo != installed)
-                   MAPSET(&solv->dupmap, p);
+                 Solvable *s = pool->solvables + p;
+                 if (!s->repo || s->repo == installed)
+                   continue;
+                 if (!pool_installable(pool, s))
+                   continue;
+                 MAPSET(&solv->dupmap, p);
                }
-             if (how & SOLVER_FORCEBEST)
+             if ((how & SOLVER_FORCEBEST) != 0)
                solv->bestupdatemap_all = 1;
-             if (how & SOLVER_CLEANDEPS)
+             if ((how & SOLVER_CLEANDEPS) != 0 && installed)
                {
                  FOR_REPO_SOLVABLES(installed, p, s)
                    add_cleandeps_updatepkg(solv, p);