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

Bug 440220

Summary: app-admin/eselect: profile.eselect: support long descriptions of profiles
Product: Gentoo Hosted Projects Reporter: SpanKY <vapier>
Component: eselectAssignee: Gentoo eselect Team <eselect>
Status: CONFIRMED ---    
Severity: enhancement CC: pchrist, yngwin
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description SpanKY gentoo-dev 2012-10-30 08:16:43 UTC
would be great if `eselect profile list` would check for a metadata.xml in the directory and if so, extract the description field and display it.  this way we can better describe the purpose of profiles than have people guess at it based on the simple/short name.
Comment 1 Ulrich Müller gentoo-dev 2012-10-30 11:10:40 UTC
This could be done if the information was available from some file that is easy to parse from bash.

If it's XMl, then I don't think that adding things like XML-XPath to eselect's dependencies is a godd idea.
Comment 2 SpanKY gentoo-dev 2013-01-22 06:59:30 UTC
(In reply to comment #1)

inventing another file format when we already have a standard (and one that supports localization) doesn't seem like a good idea

i don't see a problem with having an optional USE=xml in eselect and if the user builds it with USE=-xml, it uses sed to dump the first entry

if xml --version >/dev/null; then
  echo `xml sel -t -m pkgmetadata -v longdescription ${metadata_xml}`
else
  tr '\n' ' ' < ${metadata_xml} | \
    sed -r 's:.*<longdescription[^>]*>([^<]*).*:\1:'
fi