-- new suggestions :) [optional] --
3. Now it can happen, that a missing dependency is added to the *data list many times. For example, if there is a popular unresolvable package in our repo, let's say gtk2, and we have 10 packages in the target list depend on that, then we get "gtk2 requires foo" error 10 times (if user doesn't want to remove unresolvable packages). So we may want to check *data list before adding a new missing dependency to avoid duplication.
+1
4. One more comment (I've just realised this during writing the previous one). I never liked our unresolvable dependencies errors: User does "pacman -S foo1 foo2 foo3" and he may get "error: bar requires baz", and he says "What?". Now, after your patch we can easily say, what package "induced" that error (pkg param of resolvedeps). We have a field causingpkg in pmdepmissing_t, we may want to use that for this purpose. (With -R that field has an other meaning, so this may be not a good idea.) Or we can print this info via PM_TRANS_CONV_REMOVE_PKGS.
+1
I just found a funny test case on my first try. Funny because besides the same missing dependency message being printed many times, there is also a "provider package was selected" printed multiple times, which makes the whole thing worse. If I understood you correctly, all these missing dependency messages look the same because we are missing one information : the "causingpkg", which is a target package that has an unresolvable dependency, correct? So with that additional info, all these missing dependency messages would be different. It seems fine to me to reuse the causingpkg field for that, because that name is quite general. We would just need to document well what it means in -R case, and what it means in -S/-U case.
sudo LANG=C pacman -S kde --ignore libxinerama kde package not found, searching for group... :: group kde (including ignored packages): kdeaccessibility kdeadmin kdeartwork kdebase kdebase-runtime kdebase-workspace kdeedu kdegames kdegraphics kdelibs kdemultimedia kdenetwork kdepim kdepimlibs kdeplasma-addons kdesdk kdetoys kdeutils kdewebdev :: Install whole content? [Y/n] resolving dependencies... warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" warning: cannot resolve "libxinerama", a dependency of "qt" warning: cannot resolve "libxinerama", a dependency of "qt" warning: provider package was selected (freeglut provides glut) warning: cannot resolve "libxinerama", a dependency of "qt" :: the following package(s) cannot be upgraded due to unresolvable dependencies: kdeaccessibility kdeadmin kdeartwork kdebase kdebase-runtime kdebase-workspace kdeedu kdegames kdegraphics kdelibs kdemultimedia kdenetwork kdepim kdepimlibs kdeplasma-addons kdesdk kdetoys kdeutils kdewebdev
Do you want to skip the above package(s) for this upgrade? [Y/n] looking for inter-conflicts... local database is up to date
Bump on these. As I see, 1-2 are fixed now (mentioned in the first mail of this thread). But the "duplicated messages/data-list" issue is still here. After my "Print warning in _alpm_resolvedep() if a satisfier package is ignored without QUESTION" patch this issue became even worse, maybe that patch should be reverted, I dunno... The most precise [but ugly source-code] solution would be the following (imho): Maintain a dropped list for dropped (unresolvable) packages. This would prevent duplicated work (and duplicated messages), and this would speed-up our algorithm a bit in xav's example. Bye