Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
portage library functions or similar?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cruxnor
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2004
Posts: 133

PostPosted: Sat Dec 25, 2004 11:21 pm    Post subject: portage library functions or similar? Reply with quote

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 :D

Any suggestions?

-cruxnor
Back to top
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Sat Dec 25, 2004 11:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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