Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74084 - Request: emerge --xml - XML output for portage
Summary: Request: emerge --xml - XML output for portage
Status: RESOLVED LATER
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Conceptual/Abstract Ideas (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-11 04:27 UTC by Lars Strojny
Modified: 2005-10-16 07:33 UTC (History)
3 users (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 Lars Strojny 2004-12-11 04:27:28 UTC
It would be quite elegant to have a possibility for XML-output in portage. Currently it is a complicated thing to parse the ouput. I would suggest the following format:

$ emerge -Dup --newuse world

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild     U ] gnome-base/gnome-2.8.0-r1 [2.8.0_pre1] -accessibility +cdr -dvdr +hal* 0 kB
[ebuild   R   ] gnome-base/gnome-vfs-2.8.3-r1  -debug -doc -gnutls +hal* +howl* +ipv6 +samba +ssl 0 kB


Total size of downloads: 0,0 kB

$ emerge -Dupv --newuse --xml world
<emerge desc="These are the packages I would merge in order">
   <update desc="These packages are updated because they are outdated">
      <package>
         <name>gnome</name>
         <category>gnome-base</category>
         <version>2.8.0-r1</version>
         <current>2.8.0_pre1</current>
         <use>
            <accessibility flag="unset" />
            <cdr flag="set" />
            <dvdr flag="unset" />
            <hal flag="new" />
         </use>
         <size>0 kb</size>
      </package>
   </update>
   <newuse desc="These packages are remerged because of changing USE-flags>
      <package>
        <name>gnome-vfs</name>
        <category>gnome-base</category>
        <version>2.8.3-r1</version>
        <current>2.8.3-r1</current>
        <use>
           <debug flag="unset" />
           <doc flag="unset" />
           <gnutls flag="unset" />
           <hal flag="new" />
           <howl flag="new" />
           <ipv6 flag="set" />
           <samba flag="set" />
           <ssl flag="set" />
       </use>
       <size>0 kb</size>
     </package>
   <newuse>
   <size>0,0 kb</size>
   <param>--deep --update --pretend --newuse</param>
   <target>world</target>
</emerge>


I've no idea what's the best implemantation. Maybe it would make sense, to use XML as the standard-ouput. The GUI-applications would be thankful ;-)
Comment 1 Lars Strojny 2005-02-12 03:20:55 UTC
Are they any thoughts about this request or should it be closed as wontfix?
Comment 2 Brian Harring (RETIRED) gentoo-dev 2005-02-12 03:35:35 UTC
Err... what are you attempting to do?
Just get the depgraph/build list?  Cause going through and hacking up the existing code to do --xml really ain't my idea of fun/high priority... :)
Comment 3 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2005-04-15 19:41:49 UTC
Getting the whole emerge to ouput xml is hard. I think xml output for "--pretend --verbose" is enough. It seems you have to write another 262-lines depgraph.display function (let's call it depgraph.xml_display)

Anyway, it should be possible to this with portageapi :)
Comment 4 Markus Tacker 2005-06-02 04:10:17 UTC
I would love an XML output too.

I would have my gentoo boxes post the xml output of emerge -uDpv world to a
central server, where a script generates a graphical overwiew which box need
which updates. Makes it easier as reading mails every day where emerge states
that there are no updates available.

Additinally a feature for update would be usefull which prints the changelog for
the package which will be updated.
Comment 5 Lars Strojny 2005-06-03 09:05:04 UTC
Should there be a proposal for a GLEP? If it is wanted, I'm going to write one.
Comment 6 Marius Mauch (RETIRED) gentoo-dev 2005-06-04 06:26:49 UTC
No need for a GLEP as this only affects portage. Don't expect any news on this
in the near future though, this depends on more important things being
implemented first.
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-10-16 07:33:32 UTC
Marking as LATER for the time being. Either way, it wouldn't be integrated 
into emerge itself but would be a separate tool.