[Distutils] Patch to bdist_rpm

Harry Henry Gebel hgebel@inet.net
Sun, 4 Jun 2000 23:09:49 -0400

On Sun, Jun 04, 2000 at 10:38:59AM -0400, Greg Ward wrote:
> On 04 June 2000, Harry Henry Gebel said:
> > Reads scripts in from files rather than strings
> Then why do the help strings say
>   --prep-script        pre-build script  (Bourne shell code)
>   --build-script       build script (Bourne shell code)
>   --install-script     installation script (Bourne shell code)
>   --clean-script       clean script (Bourne shell code)
>   --pre-install        pre-install script (Bourne shell code)
>   --post-install       post-install script (Bourne shell code)
>   --pre-uninstall      pre-uninstall script (Bourne shell code)
>   --post-uninstall     post-uninstall script (Bourne shell code)
> ?  My automatic response to those help messages would be
>    setup.py bdist_rpm \
>      --post-install="echo 'thanks for installing me" \
>      --pre-uninstall="echo 'you bastard! how dare you uninstall me?'"

Good point; the help strings do not do a good job at indicating that a path
is wanted. Unfortunately I'm not good at thinking up help strings.

>   * you might prefer to write your {pre,post}-{install,uninstall}
>     scripts in Python rather than shell, especially if you'll use
>     the same scripts on non-Unix platforms

I will have to ask on the RPM list how people have handled using non-shell
scripts; maybe insert the python script into the shell script with `python
-c `? (Or `echo | python -`?) Both of these would generate a pretty sloppy
looking spec file with lots of escapes (unless the author refrained from
quoting with '"' and using the '$' and '\' characters), but maybe they are
best; sometimes utility wins out over aesthetics. Anyhow I will see how
this problem has been handled in the past as I'm sure other people have run
into it.

Harry Henry Gebel, Senior Developer, Landon House SBS        ICQ# 76308382
West Dover Hundred, Delaware