View previous topic :: View next topic |
Author |
Message |
cruxnor Tux's lil' helper
Joined: 12 Mar 2004 Posts: 133
|
Posted: Sat Dec 25, 2004 11:21 pm Post subject: portage library functions or similar? |
|
|
Hi,
I have a "status-script" which runs every night and summarizes some states of the server. Now I want to include the new packages which are available through portage. Are there some functions, libraries or anything else where I can include the process of an 'emerge -uDp world' in for e.g. a perl-script, or do I have to write a parser for the output of emerge?
It would be great if there were some functions to load all the new packages in an array
Any suggestions?
-cruxnor |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Sat Dec 25, 2004 11:57 pm Post subject: |
|
|
It would be possible if you were using Python, as you could import the portage modules and call the correct methods (though you'd have to look at /usr/bin/emerge to figure out the right ones to call). If you insist on using perl, then you can try accomplish the same thing using Inline::Python, or write a parser. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|