[Distutils] Fwd: Re: distutils bdist_rpm and %postun section of spec file

David Malcolm dmalcolm at redhat.com
Fri Sep 18 22:00:17 CEST 2009


On Fri, 2009-09-18 at 21:55 +0200, Michał Klich wrote:
> 
> Dnia czwartek 17 września 2009 o 23:07:17 A. Cavallo napisał(a):
> > Hi,
> > as rule of thumb (followed now by all major distros) you should not put any
> > script in %postun, %postinst etc sections.
> > 
> > Regards,
> > Antonio
> > 
> > > Hello,
> > > I am looking for some advise in creating rpm package using bdist_rpm.
> > > I have managed to create post_install part using information
> > > http://stackoverflow.com/questions/1321270/how-to-extend-distutils-with-a
> > >-s imple-post-install-script Now i would like to add some code to %postun
> > > part of spec file to revert changes done by my post_install command.
> > > Is there a way to add it in setup.py or do i have to manually edit spec
> > > file?
> > 
> > _______________________________________________
> > Distutils-SIG maillist  -  Distutils-SIG at python.org
> > http://mail.python.org/mailman/listinfo/distutils-sig
> > 
> 
> It is not mentioned in Fedora guidelines
> http://fedoraproject.org/wiki/Packaging/Guidelines#Packaging_Guidelines
> 
> Ok, how would you handle creating symlink in setup.py? and removing it of 
> course when uninstalling rpm. That is my goal. 
> I managed to create symlink with setup.py but can not find any option for 
> removing, which is i think correct as there is no uninstall option for 
> setup.py.

Why is the symlink not simply a part of the rpm payload?  That way it
would be created on installation and removed on removal.


Dave



More information about the Distutils-SIG mailing list