Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
User-defined post-install hooks?
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
the_g_cat
Tux's lil' helper
Tux's lil' helper


Joined: 31 Mar 2004
Posts: 117
Location: Dortmund - Germany

PostPosted: Mon Jun 15, 2009 1:08 pm    Post subject: User-defined post-install hooks? Reply with quote

Hello,

Is there a way to define post-install hooks for specific packages without touching the portage tree? Two cases from the last weeks that come to mind: an svn update apache didn't catch, which caused apache to barf on svn repos until I reloaded it, and eaccelerator, which has to be recompiled each time php is updated.

TIA
Back to top
View user's profile Send private message
gms1
n00b
n00b


Joined: 10 Oct 2008
Posts: 27

PostPosted: Tue Jun 16, 2009 5:59 pm    Post subject: Reply with quote

you can create a 'post_pkg_postinst' function in /etc/portage/bashrc

Code:

post_pkg_postinst() {
  if [ "${CATEGORY}/${PN}" = "www-servers/apache" ]; then
    # do what ever you want
    echo postinst hook for apache
  fi
}



Guenter
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6290

PostPosted: Tue Jun 16, 2009 6:21 pm    Post subject: Reply with quote

Better do it in /etc/portage/env/category/package or /etc/portage/env/category/package-version:
/etc/portage/env/cat-foo/bar wrote:
post_pkg_postinst () {
whatever you want
}
Back to top
View user's profile Send private message
the_g_cat
Tux's lil' helper
Tux's lil' helper


Joined: 31 Mar 2004
Posts: 117
Location: Dortmund - Germany

PostPosted: Tue Jun 16, 2009 9:10 pm    Post subject: Reply with quote

mv wrote:
Better do it in /etc/portage/env/category/package or /etc/portage/env/category/package-version:
/etc/portage/env/cat-foo/bar wrote:
post_pkg_postinst () {
whatever you want
}


That looks exactly what I was looking for, thanks. Is there a comprehensive documentation about the different files and dirs in /etc/portage?
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