Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923016 - Improve readability for dependency error messages
Summary: Improve readability for dependency error messages
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-27 12:41 UTC by Mark
Modified: 2024-01-28 12:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2024-01-27 12:41:44 UTC
The output of dependency issues is quite unreadable (I am using Gentoo for like 20 years and still cannot read the messages right). Here is an example:

---
WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

dev-libs/libxml2:2

  (dev-libs/libxml2-2.12.4:2/2::gentoo, ebuild scheduled for merge) USE="ftp icu lzma python readline -debug -examples -static-libs -test" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python3_11 -python3_10 (-python3_12)" conflicts with
    <dev-libs/libxml2-2.12.0 required by (app-emulation/virtualbox-7.0.14-r1:0/7.0::gentoo, ebuild scheduled for merge) USE="alsa dbus gui nls opengl pam pulseaudio sdk sdl udev -debug -doc -dtrace -java -lvm (-pch) -python -vboxwebsrv -vde -vnc" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_11 -python3_10"
    ^                 ^^^^^^
---

The important information (what failed and why) is hidden in a lot of information that users don't really need (all the use flags and slots; and of course the ebuild is scheduled for merge because I executed emerge, so why is that even here), expressed somewhat in reverse and incomplete (libxml is a dependency for virtualbox but in conflict with its requirements and both are supposed to be updated).

Plus I don't get what the ^ characters are supposed to point to, on the terminal they point at '-vnc' and ')" PYTHON', unless I paste the message into an editor and set font size 6 or so, then it points to < and the version of '<dev-libs/libxml2-2.12.0'.

After knowing what failed and why, I query the package information: which version do I have, which versions are available, are they masked, keyworded and maybe the use flags. I guess the current output format tries to deliver that information, but I was never able to really use the error output for something else than searchin package names, guessing what package causes which error, looking up all packages and trying to untangle that web.
With one package that might be doable, but with 5-10 packages and their dependency it gets a long trial and error run of half an hour.

The same message would be much clearer this way:

---
Skipped packages:
dev-libs/libxml2-2.12.0 app-emulation/virtualbox-7.0.14-r1

Conflicts:
app-emulation/virtualbox-7.0.14-r1 requires <dev-libs/libxml2-2.12.0
>=dev-libs/libxml2-2.12.0 conflicts with app-emulation/virtualbox-7.0.14-r1
---

It has the following advantages:

* Package names are printed together as a compact set, without interruption of multiple lines
  - Information that is not needed immediately is not printed
  - all important information at once
  - saves my time
* All conflicts are explicitly printed as a list
  - I get more context (actually 2 packages are skipped here), maybe find connections immediately
  - I can set my priorities and then manually query the packages


Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-27 22:58:56 UTC
Please don't truncate output, especially when seeking improvements/feedback/etc on the output itself. The rest of it does matter.

> 
> The important information (what failed and why) is hidden in a lot of
> information that users don't really need (all the use flags and slots; and
> of course the ebuild is scheduled for merge because I executed emerge, so
> why is that even here),

because it might be a conflict with something installed instead

> [...]
> Plus I don't get what the ^ characters are supposed to point to, on the
> terminal they point at '-vnc' and ')" PYTHON', unless I paste the message
> into an editor and set font size 6 or so, then it points to < and the
> version of '<dev-libs/libxml2-2.12.0'.
> 

There's a bug somewhere about the arrows not really pointing to the correct thing (doesn't seem to take into account either terminal width(?) or the length of the USE flag printing, or something). I can't find it right now.

> [...]
>   - I get more context (actually 2 packages are skipped here), maybe find
> connections immediately

I think it's only one. If it were two, that wouldn't make much sense, as if both were skipped, there'd be no conflict. You skip one, then you get a conflict telling you why it was skipped.

Anyway, the feedback is valuable (thank you) and similar to bug 918658. It does need improving.