Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627740 - emerge pretend output without color cannot show @world items
Summary: emerge pretend output without color cannot show @world items
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-13 00:20 UTC by Robin Johnson
Modified: 2017-08-14 04:36 UTC (History)
1 user (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 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-08-13 00:20:46 UTC
In emerge pretend output, on a color terminal, bolded lines are used to show packages that in the world file.

If the output is redirected to a file, no colors or bold are rendered.
The colors aren't significant, however there is no way in the non-colored output which packages are in world or not.

Please introduce something so that it can be easily seen in the non-color output which packages are in the worldfile.
Comment 1 Zac Medico gentoo-dev 2017-08-13 20:24:17 UTC
I guess this is something we could include in the --columns display, or possibly we could add an option to render the merge list as JSON.

The information that you're after could also be gleaned from a representation of the dependency graph, where @selected, @system, and @profile would be the root nodes. We could have an option to output the dependency graph in DOT format, which people could nicely render with graphviz:

https://en.wikipedia.org/wiki/DOT_(graph_description_language)
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-08-14 04:36:58 UTC
Rendering in JSON, and then processing via DOT is fine by me. I've used Graphviz extensively in the past.

JSON would make processing of the output a LOT easier, since it provides a structured output of what's going to be done.

I'd make it print a dictionary of all items to be installed, with one of the keys being all dependencies of a given item that are going to be processed.

{ 
  "dev-cpp/glibmm": {
      ..
     "RESOLVED_DEPENDS": []
   }
  "dev-cpp/glibmm-2.50.1:2::gentoo": {
     ...
     "RESOLVED_DEPENDS": [ "dev-libs/glib-2.50.3-r1:2::gentoo" ]
  },
  "net-libs/glib-networking-2.50.0::gentoo": {
    ...
    "RESOLVED_DEPENDS": [ "dev-libs/glib-2.50.3-r1:2::gentoo" ]
  }
}