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

Bug 353234

Summary: REQUIRED_USE output is confusing
Product: Portage Development Reporter: Tomáš Chvátal (RETIRED) <scarabeus>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS, REGRESSION
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 300071, 349307    

Description Tomáš Chvátal (RETIRED) gentoo-dev 2011-01-30 14:53:27 UTC
Instead of printing out the REQUIRE_USE content and telling it is not sattisfied the emerge should tell user what to do to fix the issue.

[13:33:18] <scarabeus> guys i want to tell you
[13:33:26] <scarabeus> required_use explanation is ****** unreadable
[13:33:48] <scarabeus>   The following REQUIRED_USE flag constraints are unsatisfied:                                                                                                        
[13:33:48] <scarabeus>     bindist? ( !amr !faac !win32codecs ) cdio? ( !cdparanoia !cddb ) dvdnav? ( dvd ) ass? ( iconv truetype ) truetype? ( iconv ) unicode? ( iconv ) vorbis? ( tremor ) radio? ( any-of ( alsa oss ) ) xvmc? ( xv ) faac? ( encode ) x264? ( encode ) xvid? ( encode ) toolame? ( encode ) twolame? ( encode ) dga? ( X ) dxr3? ( X ) ggi? ( X ) opengl? ( X ) osdmenu? ( X ) vdpau? ( X ) vidix? ( X ) xinerama? ( X ) xscreensaver? ( X ) xv? ( X ) xvmc? ( X )
[13:33:48] <scarabeus> i had cdio and cddb both enabled...
[13:33:55] <scarabeus> took me quite while to figure out :P
[13:35:01] <scarabeus> cant it just say Enable use Z like with unsattisfied dependencies?
Comment 1 Zac Medico gentoo-dev 2011-01-30 20:21:57 UTC
(In reply to comment #0)
> cant it just say Enable use Z like with unsattisfied dependencies?

Yes, that would be much nicer. Also, it would be nice if --autounmask could suggest configuration changes for REQUIRED_USE.
Comment 2 Zac Medico gentoo-dev 2011-01-31 00:43:29 UTC
A really simple way to improve the output would be to separate out the unsatisfied portion(s) of the expression. Still we may want to simultaneously display the entire expression, for the user to have as a reference while making USE adjustments.
Comment 3 Sebastian Luther (few) 2011-01-31 07:17:13 UTC
Some things to consider:

There are 2^N possible use settings that might have to be checked, where N is the number of different use flags in the REQUIRED_USE strings. Looking at the example above N can be quite large in real use cases. You simply don't want this this display stuff to take 1 minute or even much more in some cases.

The next thing is the number of solutions. Consider REQUIRED_USE="X? ( ^^ ( x_1 ... x_m ) )". This string already has m+1 "equally good" solutions. Which one should autounmask choose? Now assume REQUIRED_USE="X? ( ^^ ( x_1 ... x_m ) ) b? Y? ( ^^ ( y_1 ... y_n ) )". Now we are at (m+1)*(n+1) solutions.

What do you think about the following output (showing only unsatisfied constrains):

enabling use 'bindist' requires
----use 'arm' disabled
----use 'faac' disabled
----use 'win32codecs' disabled
enabling use 'radio' requires
----at least one of the following
--------use 'alsa' enabled
--------use 'oss' enabled
Comment 4 Zac Medico gentoo-dev 2011-02-03 23:41:22 UTC
This is fixed in git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c9ed39f98c62760333c9fe4d4ef5b8caa06a9e16

The new output looks like this:

  The following REQUIRED_USE flag constraints are unsatisfied:
    cdio? ( !cdparanoia )

  The above constraints are a subset of the following complete expression:
    bindist? ( !amr !faac !win32codecs ) cdio? ( !cdparanoia !cddb ) dvdnav? ( dvd ) ass? ( iconv truetype ) truetype? ( iconv ) unicode? ( iconv ) vorbis? ( tremor ) radio? ( any-of ( alsa oss ) ) xvmc? ( xv ) faac? ( encode ) x264? ( encode ) xvid? ( encode ) toolame? ( encode ) twolame? ( encode ) dga? ( X ) dxr3? ( X ) ggi? ( X ) opengl? ( X ) osdmenu? ( X ) vdpau? ( X ) vidix? ( X ) xinerama? ( X ) xscreensaver? ( X ) xv? ( X ) xvmc? ( X )
Comment 5 Zac Medico gentoo-dev 2011-02-05 08:29:17 UTC
This is fixed in 2.1.9.36 and 2.2.0_alpha20.