[pacman-dev] Questions about stderr/stdout behaviour on failures
Hello, when file conflicts in packages occur, why does the actual conflict get written to stdout and only an non-informative error message to stderr? Example: Stderr only: warning: dependency cycle detected: warning: libglvnd will be installed before its mesa dependency error: failed to commit transaction (conflicting files) ==> ERROR: 'pacman' failed to install missing dependencies. warning: dependency cycle detected: warning: harfbuzz will be installed before its freetype2 dependency warning: dependency cycle detected: warning: libglvnd will be installed before its mesa dependency error: failed to commit transaction (conflicting files) ==> ERROR: 'pacman' failed to install missing dependencies. Both outputs combined: :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... error: failed to commit transaction (conflicting files) /opt/ros/melodic/lib/python3.9/site-packages/libgtest.so exists in both 'ros-melodic-moveit-core' and 'ros-melodic-tf' /opt/ros/melodic/lib/python3.9/site-packages/libgtest.so.1.10.0 exists in both 'ros-melodic-moveit-core' and 'ros-melodic-tf' Errors occurred, no packages were upgraded. ==> ERROR: 'pacman' failed to install missing dependencies. ==> Missing dependencies: -> ros-build-tools -> ros-melodic-message-filters -> ros-melodic-moveit-core -> ros-melodic-moveit-msgs As e.g. the dependency cycle errors get fully written to stderr, is this a bug or itended? Imho this one line more is important to stderr, otherwise the whole stderr log helps me as much as the returncode. Regards, Oskar
On 28/5/21 10:35 pm, Oskar Roesler via pacman-dev wrote:
Hello,
when file conflicts in packages occur, why does the actual conflict get written to stdout and only an non-informative error message to stderr?
My guess is this is pure oversight. The printf calls need changed to fprintf(stderr, ...). Can you file a bug if you do not want to make the patch yourself? A
Am Mittwoch, 2. Juni 2021 03:44:12 CEST schrieb Allan McRae:
On 28/5/21 10:35 pm, Oskar Roesler via pacman-dev wrote:
Hello,
when file conflicts in packages occur, why does the actual conflict get written to stdout and only an non-informative error message to stderr?
My guess is this is pure oversight. The printf calls need changed to fprintf(stderr, ...).
Can you file a bug if you do not want to make the patch yourself?
A
I'll submit a patch. Regards, Oskar
participants (2)
-
Allan McRae
-
Oskar Roesler