![](https://secure.gravatar.com/avatar/73a8f5105a881a41b5fe876b1ca926fc.jpg?s=120&d=mm&r=g)
Hey there, For some time, I thought it would be better not to support pre- and post-install scripts in prt-get but I decided I'll leave this choice to the user ;-). The more, there was some discussion about better ways to support pre-/post-installation, but nothing actually worked out. As we currently have some ports with post-install scripts, I decided to offer a simple solution which might be removed once there's a better way to do it (e.g. in pkgutils). The current implementation is meant to simplify installation of large suites of packages like gnome or kde. Credits for an initial version of this go to Daniel Müller, unfortunately I didn't find his patch anymore therefore his name didn't make it into prt-get's source code ;-). I've uploaded prt-get 0.5.2pre2 (just update the Pkgfile) which has the following new switches: --pre-install (execute pre-install scripts) --post-install (execute post-install scripts) --install-scripts (execute both pre- and post-install) Testing from interested packagers is very much appreciated! 0.5.2pre2 also includes a 'remove' command to call pkgrm on an arbitrary number of ports: prt-get remove perl ruby python For users of the programmable bash completion, I've updated misc/prt-get_complete as well (in the tarball). Notes: - the scripts must be in the port's directory and have the exact name 'pre-install' and 'post-install' - They're executed for every install and update; therefore, the packager must ensure that things work even if the very same script was already called during an earlier install; - failing pre/post scripts don't interrupt the installation process - the listing in the very end will tell you which ports had pre/post scripts and whether it succeeded or not - In test mode, you won't see whether scripts would be executed Example session: [15:43][root@hoc:~]# prt-get install prepost --install-scripts ... -- Packages installed prepost [pre: ok] [post: ok] prt-get: installed successfully [15:44][root@hoc:~]# Things left to do: - show whether there are pre-/post-install scripts in prt-get info - config file option ("always execute scripts"; not sure yet) - some uninstall equivalent; would benefit from a better specification of crux' pre/post-(un)install functionality though Kind regards, Johannes -- Johannes Winkelmann mailto:jw@tks6.net Biel, Switzerland http://jw.tks6.net
![](https://secure.gravatar.com/avatar/a21a2b39bf7bcec3953d52a83d99ecd0.jpg?s=120&d=mm&r=g)
On Tue, 2 Sep 2003 16:01:53 +0200 Johannes Winkelmann <jw@tks6.net> wrote:
Hey there,
Hi Johannes, [cut]
As we currently have some ports with post-install scripts, I decided to offer a simple solution which might be removed once there's a better way to do it (e.g. in pkgutils). The current implementation is meant to simplify installation of large suites of packages like gnome or kde.
This is great. I always felt that there was something missing in the current way CRUX handle packages installation. During last discussion on old CLC mailing list (or was it the CRUX ml?) I ended up (after a brief analysis of ports with needed some pre-post install funcion) thinking that I'd prefer to do the stuff manually for most of them. From another point of view it would be very useful to have PPIS (Pre-Post-Install Scripts [TM]) in some case.(exp. Gnome). With the great tools we have now (prt-get+pkgtools) I think that making a great distro is a consequence of having great packagers, that is how we use such tools. If the prt-get addons are appreciated among packagers, a good start could be a specification of what to include in PPIS and what not to. Regarding your mention to pkgutils and "possible better way to do it", I personally prefer to leave the base work to pkgtools and implement the fancy add-ons into 3rd party utils (prt-get). [cut]
Testing from interested packagers is very much appreciated!
I'll definitly test the patch and do every kind of nasty experiment ;) Again I realized that I replied to your post with --verbose-mode-on, please bear with me. I see CRUX & CLC getting better and better everyday, and we're now discussing about the few shortcomings I could ever find in the distro..that is really exciting!
Kind regards, Johannes
Regards, Simone
![](https://secure.gravatar.com/avatar/73a8f5105a881a41b5fe876b1ca926fc.jpg?s=120&d=mm&r=g)
[...] If the prt-get addons are appreciated among packagers, a good start could be a specification of what to include in PPIS and what not to. Yeah, we should definitely write some sentences about this in the
Hey, On Tue, Sep 02, 2003 at 22:46:01 +0200, Simone Rota wrote: [...] package guidelines. We could probably define "dos and don'ts with pre- and post-install". I've started a discussion page on the CLC Wiki, every with a cvstrac account is invited to write his comments there: http://crux.fh-regensburg.de/cgi-bin/cvstrac/wiki?p=PrePostInstallGuidelines Kind regards, Johannes -- Johannes Winkelmann mailto:jw@tks6.net Biel, Switzerland http://jw.tks6.net
participants (2)
-
Johannes Winkelmann
-
Simone Rota