Feedback: could apk in terms of this concrete case tell me more clearly what is happening? (details inside)
Sorry that I am coming with a super specific case again, but I am occasionally being not smart enough to deal with the apk error messages while I almost never have this issue with apt or dnf, so I feel like maybe there is something that can be improved here. But I just don't know enough to tell you the perfect fix, so I'm hoping with showing where exactly I fail to make sense of concrete examples that'll leave you with some ideas on how to address it.
Here is one error that had me very stumped:
Full error (sorry it's so long, but I'm pasting it all for context):
$ sudo apk add gnome-desktop-dev
ERROR: unsatisfiable constraints:
mesa-git-glapi-0_git20200323-r0:
breaks: mesa-dev-20.0.7-r0[mesa-glapi=20.0.7-r0]
satisfies: world[mesa-git-glapi] world[mesa-glapi] world[so:libglapi.so.0] mesa-git-dri-gallium-0_git20200323-r0[mesa-git-glapi]
mesa-git-dri-gallium-0_git20200323-r0[so:libglapi.so.0] mesa-git-gl-0_git20200323-r0[so:libglapi.so.0]
mesa-git-gles-0_git20200323-r0[so:libglapi.so.0] mesa-git-egl-0_git20200323-r0[so:libglapi.so.0]
mesa-git-osmesa-0_git20200323-r0[so:libglapi.so.0]
mesa-git-gles-0_git20200323-r0:
breaks: mesa-dev-20.0.7-r0[mesa-gles=20.0.7-r0]
satisfies: world[mesa-git-gles] world[mesa-gles] world[so:libGLESv2.so.2] mesa-git-dri-gallium-0_git20200323-r0[mesa-git-gles]
anbox-0_git20200519-r2[mesa-gles] phoc-0.4.2-r0[so:libGLESv2.so.2] gnome-shell-3.36.6-r0[so:libGLESv2.so.2]
qt5-qtwayland-5.14.2-r0[so:libGLESv2.so.2] qt5-qtmultimedia-5.14.2-r0[so:libGLESv2.so.2] gnome-session-3.36.0-r3[so:libGLESv2.so.2]
mutter-3.36.6-r0[so:libGLESv2.so.2] qt5-qtbase-x11-5.14.2-r1[so:libGLESv2.so.2] plasma-framework-5.70.1-r0[so:libGLESv2.so.2]
wlroots-0.10.1-r0[so:libGLESv2.so.2]
mesa-git-gbm-0_git20200323-r0:
breaks: mesa-dev-20.0.7-r0[mesa-gbm=20.0.7-r0]
satisfies: world[mesa-gbm] world[mesa-git-gbm] world[so:libgbm.so.1] mesa-git-dri-gallium-0_git20200323-r0[mesa-git-gbm] cogl-1.22.8-r0[so:libgbm.so.1]
mutter-3.36.6-r0[so:libgbm.so.1] qt5-qtbase-x11-5.14.2-r1[so:libgbm.so.1] mesa-git-egl-0_git20200323-r0[so:libgbm.so.1]
xorg-server-xwayland-1.20.9-r1[so:libgbm.so.1] wlroots-0.10.1-r0[so:libgbm.so.1]
mesa-git-egl-0_git20200323-r0:
breaks: mesa-dev-20.0.7-r0[mesa-egl=20.0.7-r0]
satisfies: world[mesa-egl] world[mesa-git-egl] world[so:libEGL.so.1] mesa-git-dri-gallium-0_git20200323-r0[mesa-git-egl]
anbox-0_git20200519-r2[mesa-egl] gst-plugins-base-1.16.2-r3[so:libEGL.so.1] qt5-qtwayland-5.14.2-r0[so:libEGL.so.1]
qt5-qtmultimedia-5.14.2-r0[so:libEGL.so.1] cogl-1.22.8-r0[so:libEGL.so.1] gnome-session-3.36.0-r3[so:libEGL.so.1]
mutter-3.36.6-r0[so:libEGL.so.1] qt5-qtbase-x11-5.14.2-r1[so:libEGL.so.1] vlc-3.0.11-r0[so:libEGL.so.1]
plasma-framework-5.70.1-r0[so:libEGL.so.1] kwayland-5.70.0-r0[so:libEGL.so.1] webkit2gtk-2.28.4-r0[so:libEGL.so.1]
libwpebackend-fdo-1.6.0-r1[so:libEGL.so.1] mplayer-1.4.0-r2[so:libEGL.so.1] wlroots-0.10.1-r0[so:libEGL.so.1]
mesa-git-gl-0_git20200323-r0:
breaks: mesa-dev-20.0.7-r0[mesa-gl=20.0.7-r0]
satisfies: world[mesa-git-gl] world[mesa-gl] world[so:libGL.so.1] mesa-git-dri-gallium-0_git20200323-r0[mesa-git-gl] charging-sdl-0.1-r1[mesa-gl]
osk-sdl-0.57-r1[mesa-gl] gst-plugins-base-1.16.2-r3[so:libGL.so.1] gnome-session-3.36.0-r3[so:libGL.so.1] mutter-3.36.6-r0[so:libGL.so.1]
vlc-3.0.11-r0[so:libGL.so.1] xorg-server-xwayland-1.20.9-r1[so:libGL.so.1] webkit2gtk-2.28.4-r0[so:libGL.so.1]
mplayer-1.4.0-r2[so:libGL.so.1]
gtk+3.0-9999_git20200616-r0:
breaks: gtk+3.0-dev-9999_git20200616-r2[gtk+3.0=9999_git20200616-r2]
satisfies: world[cmd:gtk-builder-tool] world[cmd:gtk-encode-symbolic-svg] world[cmd:gtk-launch] world[cmd:gtk-query-immodules-3.0]
world[cmd:gtk-query-settings] world[cmd:gtk3-demo] world[cmd:gtk3-demo-application] world[cmd:gtk3-icon-browser]
world[cmd:gtk3-widget-factory] world[gtk+3.0=9999_git20200616-r0] firefox-81.0-r0[so:libgdk-3.so.0] firefox-81.0-r0[so:libgtk-3.so.0]
gnome-shell-3.36.6-r0[so:libgdk-3.so.0] gnome-shell-3.36.6-r0[so:libgtk-3.so.0] evolution-data-server-9999-r0[so:libgdk-3.so.0]
evolution-data-server-9999-r0[so:libgtk-3.so.0] gnome-bluetooth-libs-3.34.2-r0[so:libgdk-3.so.0]
gnome-bluetooth-libs-3.34.2-r0[so:libgtk-3.so.0] mutter-3.36.6-r0[so:libgdk-3.so.0] mutter-3.36.6-r0[so:libgtk-3.so.0]
gnome-desktop-3.36.6-r0[so:libgdk-3.so.0] gnome-desktop-3.36.6-r0[so:libgtk-3.so.0] geary-3.36.2-r1[so:libgdk-3.so.0]
geary-3.36.2-r1[so:libgtk-3.so.0] megapixels-0.9.0-r0[so:libgdk-3.so.0] megapixels-0.9.0-r0[so:libgtk-3.so.0]
squeekboard-1.9.3-r0[so:libgdk-3.so.0] squeekboard-1.9.3-r0[so:libgtk-3.so.0] evince-libs-9999_git20191211-r0[so:libgdk-3.so.0]
evince-libs-9999_git20191211-r0[so:libgtk-3.so.0] evince-9999_git20191211-r0[so:libgdk-3.so.0] evince-9999_git20191211-r0[so:libgtk-3.so.0]
calls-0.1.7-r0[so:libgdk-3.so.0] calls-0.1.7-r0[so:libgtk-3.so.0] chatty-0.1.15-r0[so:libgdk-3.so.0] chatty-0.1.15-r0[so:libgtk-3.so.0]
gnome-bluetooth-3.34.2-r0[so:libgtk-3.so.0] evince-nautilus-9999_git20191211-r0[so:libgtk-3.so.0]
mesa-git-osmesa-0_git20200323-r0:
breaks: mesa-dev-20.0.7-r0[mesa-osmesa=20.0.7-r0]
mesa-git-xatracker-0_git20200323-r0:
breaks: mesa-dev-20.0.7-r0[mesa-xatracker=20.0.7-r0]
Ok, so there it is. Now, I'll describe my story going about it: because I have no idea and I want to be pragmatic, I'm looking at the first constraint only. Maybe that will give me an idea on what I can actually do about this situation. So I will ignore the others for this ticket, and just look at the first block, as I did as a user approaching this.
1. Minor uncertainty: I'm guessing (somewhat confidently) which side caused which constraint, as in what belongs to what's already there vs what I am installing
The first thing I am not 100% sure about is I can't really tell for certain which side caused which constraint, or "from which side I am looking at this". E.g. regarding the mesa-git-glapi-0_git20200323-r0
: is that what gnome-desktop-dev
wants, and the thing it "breaks:" the situation in the system? Or the other way around, and "breaks" is the stuff that gnome-desktop-dev
wants?
I am strongly assuming the former, so I'm not saying it's necessarily super confusing the way it is. However, it still seems unfortunate to guess this, even when I'm 90% sure I got it right. So maybe there would be some way to specify this more clearly.
2. Major confusion: I don't understand why it can't be auto-solved
From this, I am making the following (very possibly wrong) assumptions: 1. gnome-desktop-dev
appears to require mesa-git-glapi-0_git20200323-r0
. 2. this seems to conflict with mesa-dev-20.0.7-r0
which wants mesa-glapi=20.0.7-r0
. And for some reason, mesa-dev-20.0.7-r0
can't be just changed to a compatible version.
Ok, so now I am thinking, I guess I better do something about mesa-dev-20.0.7-r0
!
However, I am already a bit confused at this point about that: I am wondering now, why can't apk just swap out mesa-dev
for me? I'm assuming there is a reason, but it feels like it's just not telling me. Like, would swapping mesa-dev
out violate something else? I'm wondering especially what further down the chain this all conflicts with, and why it can't just be changed to fitting versions by apk for me. (Or could apk do that, and chooses not to? I don't know, and that was already frustrating me at this point.)
3. Major confusion: I don't understand where the presumably system-side mesa-dev
constraint comes from at all
However, I didn't give up and thought, why not poke around and see what version of mesa-dev is installed and what possibly depends on it. Since apk info mesa-dev
doesn't seem to specify what version is actually on disk, I got creative and tried the following to get some clues:
$ sudo grep -r "mesa-dev" /lib/apk/db
$ sudo grep -r "mesa-dev" /etc/apk/world
$
Ok, now I'm very confused. Seems like no mesa-dev
is even installed. (The grep on other installed packages works fine!)
At this point, I'm completely at a loss about what is even going on. Where does mesa-dev
even come from then? Why doesn't apk tell me? And here, I'll try to draw an attempt of a conclusion:
Summary
Please note I might be misunderstanding most of this, hence the above in-depth description of my thoughts. However, I'll try to make some very uninformed concrete suggestions at least:
-
Maybe better attribution with clear words would help? Like what is causing what constraint with a full trace to either what I am installing or a clearly identified installed package: Like
mesa-git-glapi-0_git20200323-r0 as wanted by gnome-gnome-desktop-dev: ... breaks mesa-dev-20.0.7-r0 as required by ... which wants mesa-glapi=20.0.7-r0
. I assume the current condensed bracket notation is meant to deal with the walls of text issue, but I feel like ultimately it might be backfiring here. (Or maybe that is just me, I don't know.) -
Maybe in general always posting some suggested solution other than not installing it would help, even if it doesn't actually prompt me to act on it. E.g. which package(s) would need to be removed as the smallest found removal set to make it work, and does such a set exist at all without tracing back to pinned as unremovable packages? What unremovable packages would that trace back to? Would it be solved by just changing the installed version of a set of packages, and which minimum set would that be with what versions? Even if these solutions aren't useful (e.g. because they would remove a system package), I feel like it would greatly help to give me an idea to trace back where the actual problem is along the full chain. Like, is a vital package that is installed just requiring an incompatible version? Is any non-vital package requiring that? Right now, I absolutely can't tell.
I really hope that gives you something useful to work on, if not I apologize for the ticket spam. Please feel free to ignore suggestions that don't make sense, but maybe seeing where the current output may seem confusing to a user will give you some ideas for changes already.