Bundled Flash

Adam Williamson awilliam at redhat.com
Fri Aug 23 19:11:57 UTC 2013


On Fri, 2013-08-23 at 13:57 -0500, Jon Ciesla wrote:


> Sorry, just noticed the gist of this thread.  Are you trying to
> replace a directory with a symlink?  Take a look at gallery2:
> 
> 
> Example.
> 
> 
> In %install:
> #remove bundled Smarty. 
> rm -rf lib/smarty
> ln -s ../../php/Smarty2
> ${RPM_BUILD_ROOT}%{installprefix}/gallery2/lib/smarty
> 
> 
> 
> Then in %post:
> 
> if [ -L %{installprefix}/gallery2/lib/smarty ]; then
>   rm -f %{installprefix}/gallery2/lib/smarty
> fi
> if [ -d %{installprefix}/gallery2/lib/smarty -a ! -L
> %{installprefix}/gallery2/lib/smarty ]; then
>     mv %{installprefix}/gallery2/lib/smarty
> %{installprefix}/gallery2/lib/smarty.rpmbak && \
>     ln -s ../../php/Smarty2 %{installprefix}/gallery2/lib/smarty && \
>     rm -rf %{installprefix}/gallery2/lib/smarty.rpmbak
> fi 
> if [ ! -L %{installprefix}/gallery2/lib/smarty ]; then
>   ln -s ../../php/Smarty2 %{installprefix}/gallery2/lib/smarty
> fi
> 
> 
> 
> Then in %files
> %ghost %{installprefix}/gallery2/lib/smarty
> 
> 
> Pretty?  Nope.  Overkill?  Maybe?  Reliable?  So far.

Are you sure? Does it work since rpm started throwing file conflict
errors when you're trying to do this? That seems to be a fairly recent
innovation, and the changelog indicates this was written in 2008. Has it
actually been tested recently?

https://bugzilla.redhat.com/show_bug.cgi?id=447156#c22

The discussions I could find about this seem to be down on doing it in %
pre, so I can't see why %post would be any better. Ref
http://mm3test.fedoraproject.org/hyperkitty/list/devel@mm3test.fedoraproject.org/message/XRQUA2DOHNCFWWP2F7WLFW6L5GHPCERZ/ .


-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net



More information about the devel mailing list