Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 478368

Summary: sys-apps/portage: emerge should only shown output related with needed changes in use/keywords
Product: Portage Development Reporter: Pacho Ramos <pacho>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: esigra
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=460816
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 300071    

Description Pacho Ramos gentoo-dev 2013-07-27 16:27:42 UTC
Look to:
https://bugs.gentoo.org/show_bug.cgi?id=478110#c21

That portage output is really hard to understand, in that case, I would only show the "use changes" related problem (at the end) and hide the other output. Then, in next run, show errors in a splited, I mean, if I understand correctly, this hard to read output is probably generated by backtrack portage systemd, my idea would be to save (internally) the output that would have been shown without backtracking, that way, when backtrack is finally unable to resolve the situation, user is notified about the first problem only -> he/she fixes it -> rerun emerge

Thanks
Comment 1 Zac Medico gentoo-dev 2013-07-27 17:57:18 UTC
(In reply to Pacho Ramos from comment #0)
> That portage output is really hard to understand, in that case, I would only
> show the "use changes" related problem (at the end) and hide the other
> output.

The thing is, it's possible that the conflict information is more relevant than the suggested USE changes, so hiding the conflict information could do a disservice to the user.
Comment 2 Pacho Ramos gentoo-dev 2013-07-27 19:20:05 UTC
(In reply to Zac Medico from comment #1)
> The thing is, it's possible that the conflict information is more relevant
> than the suggested USE changes, so hiding the conflict information could do
> a disservice to the user.

But I have a doubt: could portage end up calculating tree in a different way after applying USE changes? In that case, I think would be more reasonable to, at a first step, get USE flags fixed, then go for the rest (step by step)
Comment 3 Sebastian Luther (few) 2013-11-29 21:34:18 UTC
(In reply to Pacho Ramos from comment #2)
> (In reply to Zac Medico from comment #1)
> > The thing is, it's possible that the conflict information is more relevant
> > than the suggested USE changes, so hiding the conflict information could do
> > a disservice to the user.
> 
> But I have a doubt: could portage end up calculating tree in a different way
> after applying USE changes? In that case, I think would be more reasonable
> to, at a first step, get USE flags fixed, then go for the rest (step by step)

If it says "the following USE changes are required", then the merge list, conflicts, etc. are computed as if the changes have already been applied.
Comment 4 Pacho Ramos gentoo-dev 2015-04-26 10:10:11 UTC
At least the messages asking people to try some USE or similar should be shown at the end to prevent them from being covered by lots of other errors. 

For example:
# USE="gd -fiat qt4 threads" emerge -1av $(cat stab-list | sed -e '/#/d') --backtrack=300 --noreplace -N

These are the packages that would be merged, in order:

Calculating dependencies... done!


[nomerge       ] sci-biology/bioperl-1.6.9::gentoo  USE="db network run -graphviz -minimal -sqlite" 
[ebuild  N    ~]  sci-biology/bioperl-db-1.6.9::gentoo  USE="{-test}" 482 KiB
[ebuild  N    ~]  sci-biology/bioperl-run-1.6.9::gentoo  USE="-minimal {-test}" 14,206 KiB
[ebuild  N    ~]  sci-biology/bioperl-network-1.6.9::gentoo  USE="{-test}" 2,147 KiB
[ebuild  N     ]  dev-perl/Bio-ASN1-EntrezGene-1.91.0-r1::gentoo  USE="{-test}" 36 KiB
[ebuild  N    ~]   sci-biology/bioperl-1.6.9::gentoo  USE="db network run -graphviz -minimal -sqlite" 11,997 KiB

Total: 5 packages (5 new), Size of downloads: 28,866 KiB

 * Error: circular dependencies:

(dev-perl/Bio-ASN1-EntrezGene-1.91.0-r1:0/0::gentoo, ebuild scheduled for merge) depends on
 (sci-biology/bioperl-1.6.9:0/0::gentoo, ebuild scheduled for merge) (buildtime)
  (dev-perl/Bio-ASN1-EntrezGene-1.91.0-r1:0/0::gentoo, ebuild scheduled for merge) (buildtime)

It might be possible to break this cycle
by applying the following change:
- sci-biology/bioperl-1.6.9 (Change USE: +minimal)

Note that this change can be reverted, once the package has been installed.

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

app-admin/testdisk:0

  (app-admin/testdisk-7.0:0/0::gentoo, ebuild scheduled for merge) pulled in by
    =app-admin/testdisk-7.0 (Argument)

  (app-admin/testdisk-6.14:0/0::gentoo, ebuild scheduled for merge) pulled in by
    =app-admin/testdisk-6.14 (Argument)

dev-qt/qtcore:4

  (dev-qt/qtcore-4.8.5-r2:4/4::gentoo, ebuild scheduled for merge) pulled in by
    ~dev-qt/qtcore-4.8.5[aqua=,debug=,qt3support] required by (dev-qt/qt3support-4.8.5:4/4::gentoo, ebuild scheduled for merge)
                                      ^^^^^^^^^^                                                                                                                   
    ~dev-qt/qtcore-4.8.5[aqua=,debug=,qt3support=] required by (dev-qt/qtsql-4.8.5:4/4::gentoo, ebuild scheduled for merge)
                                      ^^^^^^^^^^^                                                                                                              
    ~dev-qt/qtcore-4.8.5[aqua=,debug=,glib=,qt3support=] required by (dev-qt/qtgui-4.8.5-r4:4/4::gentoo, ebuild scheduled for merge)
                                            ^^^^^^^^^^^                                                                                                                 

  (dev-qt/qtcore-4.8.5-r2:4/4::gentoo, installed) pulled in by
    ~dev-qt/qtcore-4.8.5[-aqua,-debug,glib,-qt3support] required by (dev-qt/qtgui-4.8.5-r3:4/4::gentoo, installed)
                                           ^^^^^^^^^^^                                                                                                
    ~dev-qt/qtcore-4.8.5[aqua=,debug=,qt3support=] required by (dev-qt/qtopengl-4.8.5:4/4::gentoo, installed)
                                      ^^^^^^^^^^^                                                                                                

dev-qt/qtgui:4

  (dev-qt/qtgui-4.8.5-r4:4/4::gentoo, ebuild scheduled for merge) pulled in by
    ~dev-qt/qtgui-4.8.5[aqua=,debug=,glib=,qt3support] required by (dev-qt/qtcore-4.8.5-r2:4/4::gentoo, ebuild scheduled for merge)
                                           ^^^^^^^^^^                                                                                                                  
    ~dev-qt/qtgui-4.8.5[accessibility=,aqua=,debug=,qt3support] required by (dev-qt/qt3support-4.8.5:4/4::gentoo, ebuild scheduled for merge)
                                                    ^^^^^^^^^^                                                                                                                   

  (dev-qt/qtgui-4.8.5-r3:4/4::gentoo, installed) pulled in by
    ~dev-qt/qtgui-4.8.5[aqua=,debug=,egl=,qt3support=] required by (dev-qt/qtopengl-4.8.5:4/4::gentoo, installed)
                                          ^^^^^^^^^^^                                                                                                


It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously.  If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously.

For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.

The USE suggestion should be at the end
Comment 5 Pacho Ramos gentoo-dev 2015-09-21 10:35:07 UTC
This is another case of a user not knowing what to do at first to try to fix the update error because it's so large and pointing to different issues that it's a bit difficult to know what to do:
https://archives.gentoo.org/gentoo-user/message/2ab78e6233fecd0371dbe606d25e99af

From my point of view, it would be better to only show the conflicting USEs error and, then, expect the user to re-run emerge to get it calculating the dependencies again (now with proper USE flag combinations set as start point)
Comment 6 Pacho Ramos gentoo-dev 2015-09-21 10:38:14 UTC
In addition, in that case, you can see that the other shown conflicts (boost vs. librevenge and ffmpeg vs. mlt) shouldn't require any action from the user as they probably arise for their subslot deps on boost and ffmpeg and once the update is unblocked by setting the proper USEs, they shouldn't cause any problem any more.

On the other hand, with the current big error, people think they need to do anything with boost and ffmpeg :/
Comment 7 Zac Medico gentoo-dev 2015-09-21 16:56:13 UTC
We need to assign severity levels to all of the error messages, so that they can grouped by severity, and so that the severity level can be displayed to the user. That way, users with no prior experience will be able to easily recognize which messages should be given attention first.
Comment 8 Pacho Ramos gentoo-dev 2015-09-21 18:19:29 UTC
Oh, nice, it would be even better :)
Comment 9 Pacho Ramos gentoo-dev 2016-04-17 14:52:07 UTC
I have just noticed this again, as you can see in:
https://bugs.gentoo.org/attachment.cgi?id=430960

The important information:
[blocks B     ] kde-apps/kde4-l10n[-minimal(-)] ("kde-apps/kde4-l10n[-minimal(-)]" is blocking kde-plasma/kde-cli-tools-5.5.5)
[blocks B     ] kde-apps/kde4-l10n[-minimal(-)] ("kde-apps/kde4-l10n[-minimal(-)]" is blocking kde-frameworks/kwidgetsaddons-5.18.0, kde-frameworks/khtml-5.18.0, kde-frameworks/kpackage-5.18.0, kde-frameworks/karchive-5.18.0, kde-frameworks/kdesignerplugin-5.18.0, kde-frameworks/kinit-5.18.0, kde-frameworks/kcompletion-5.18.0, kde-frameworks/kitemmodels-5.18.0, kde-frameworks/kcmutils-5.18.0, kde-frameworks/kunitconversion-5.18.0, kde-frameworks/kxmlgui-5.18.0, kde-frameworks/kiconthemes-5.18.0, kde-frameworks/kitemviews-5.18.0, kde-frameworks/kbookmarks-5.18.0, kde-frameworks/kguiaddons-5.18.0, kde-frameworks/kservice-5.18.0, kde-frameworks/kio-5.18.0, kde-frameworks/kded-5.18.0, kde-frameworks/kauth-5.18.0, kde-frameworks/kwallet-5.18.0, kde-frameworks/ktextwidgets-5.18.0, kde-frameworks/kglobalaccel-5.18.0, kde-frameworks/ki18n-5.18.0, kde-frameworks/knotifications-5.18.0, kde-frameworks/kconfigwidgets-5.18.0, kde-frameworks/kcodecs-5.18.0, kde-frameworks/kwindowsystem-5.18.0, kde-frameworks/kpty-5.18.0, kde-frameworks/kjobwidgets-5.18.0, kde-frameworks/kjs-5.18.0, kde-frameworks/kconfig-5.18.0, kde-frameworks/solid-5.18.0, kde-frameworks/kdeclarative-5.18.0, kde-frameworks/kdesu-5.18.0, kde-frameworks/kdoctools-5.18.0, kde-frameworks/kparts-5.18.0, kde-frameworks/kdelibs4support-5.18.0, kde-frameworks/kcoreaddons-5.18.0, kde-frameworks/kcrash-5.18.0, kde-frameworks/kemoticons-5.18.0, kde-frameworks/sonnet-5.18.0, kde-frameworks/kdbusaddons-5.18.0)

Can be easily missed under all that full output that is printer at the end of the error
Comment 10 Pacho Ramos gentoo-dev 2019-12-16 08:01:07 UTC
This still happens, for example from all this output, the first thing to do is to disable USE test for relevant packages, that is shown before all the messages related with "multiple instances within a ..." messages

 * Error: circular dependencies:

(dev-python/importlib_metadata-0.23-r1:0/0::gentoo, ebuild scheduled for merge) depends on
 (dev-python/zipp-0.6.0-r1:0/0::gentoo, ebuild scheduled for merge) (buildtime)
  (dev-python/pytest-4.6.7:0/0::gentoo, ebuild scheduled for merge) (buildtime)
   (dev-python/importlib_metadata-0.23-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)

It might be possible to break this cycle
by applying any of the following changes:
- dev-python/importlib_metadata-0.23-r1 (Change USE: -test)
- dev-python/zipp-0.6.0-r1 (Change USE: -test)

Note that this change can be reverted, once the package has been installed.

Note that the dependency graph contains a lot of cycles.
Several changes might be required to resolve all cycles.
Temporarily changing some use flag for all packages might be the better option.

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

dev-python/numpy:0

  (dev-python/numpy-1.17.4:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-python/numpy[python_targets_python3_5(-)?,-python_single_target_python3_5(-),python_targets_python3_6(-)?,-python_single_target_python3_6(-),python_targets_python3_7(-)?,-python_single_target_python3_7(-),python_targets_python3_8(-)?,-python_single_target_python3_8(-)] required by (dev-python/cython-0.29.14-r1:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                                                                                         

  (dev-python/numpy-1.14.5:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-python/numpy[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] required by (dev-python/pygtk-2.24.0-r4:2/2::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                       
    dev-python/numpy[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),python_single_target_python2_7(+)?] required by (media-gfx/inkscape-0.92.4:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                                                                                                                                 
    dev-python/numpy[python_targets_python2_7(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (dev-python/pygame-1.9.3:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                    
    >=dev-python/numpy-1.7.1[python_targets_python2_7(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_python2_7(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (dev-python/matplotlib-2.2.2-r1:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                                                                                                   
    dev-python/numpy[python_targets_python2_7(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,python_targets_python3_7(-)?,-python_single_target_python2_7(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-)] required by (media-libs/opencv-3.4.1-r7:0/3.4.1::gentoo, installed)
                                                                                                                                                                                                                                                                                                                                                                          
    dev-python/numpy[python_targets_python2_7(-)?,-python_single_target_python2_7(-),python_targets_python3_5(-)?,-python_single_target_python3_5(-),python_targets_python3_6(-)?,-python_single_target_python3_6(-),python_targets_python3_7(-)?,-python_single_target_python3_7(-)] required by (dev-python/future-0.18.2:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                                                                                     
    dev-python/numpy[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),python_single_target_python2_7(+)?] required by (sci-chemistry/vmd-1.9.3-r2:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                                                                                                                                  
    dev-python/numpy[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] required by (sci-chemistry/pymol-1.8.4.0-r1:0/0::gentoo, installed)
                                                                                                                                                                          

dev-lang/perl:0

  (dev-lang/perl-5.30.1:0/5.30::gentoo, installed) pulled in by
    =dev-lang/perl-5.30* required by (virtual/perl-Module-Metadata-1.0.36:0/0::gentoo, installed)
    ^              ^^^^^                                                                                                                                
    dev-lang/perl:0/5.30= required by (virtual/perl-Text-ParseWords-3.300.0-r5:0/0::gentoo, installed)
                 ^^^^^^^^                                                                                                                 
    (and 145 more with the same problems)

  (dev-lang/perl-5.28.2-r1:0/5.28::gentoo, ebuild scheduled for merge) pulled in by
    dev-lang/perl:0/5.28= required by (dev-perl/File-Which-1.220.0:0/0::gentoo, installed)
                 ^^^^^^^^                                                                                                     
    (and 46 more with the same problem)

NOTE: Use the '--verbose-conflicts' option to display parents omitted above

It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously.  If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously.

For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.