Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Run command on package installation
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
jbiggs12
n00b
n00b


Joined: 09 Mar 2012
Posts: 29

PostPosted: Wed Mar 14, 2012 11:34 pm    Post subject: Run command on package installation Reply with quote

Hi,

I was wondering if it would be possible to run a program whenever portage installed a package à la apt hooks. I have a git repository in my /etc folder and I'd like it to update automatically whenever a package is installed.
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Thu Mar 15, 2012 4:48 am    Post subject: Reply with quote

What you want is to tie in to the emerge post_install hook.
It will be in /etc/portage/bashrc I think. (if I ever used it I'd remember more) I also can't seem to find the info in the man pages at the moment.
Check the forums, There have been threads about it already. So you should be able to find it somewhere.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Thu Mar 15, 2012 5:03 am    Post subject: Reply with quote

OK, apparently you should be able to just dump your script in "/etc/portage/hooks/install/" for recent portage versions.

If that doesn't work for you then you can fall back to the old documented method here: http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=6#doc_chap3
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
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