On Sunday 21 November 2010, Kevin Kofler wrote:
Ville Skyttä wrote:
> It probably did, and because the above is related to config files,
> leaving behind *.rpmorig is quite appropriate IMO. But leaving such
> cruft behind is not that fine for non-config files.
Well, instead of a mv to rpmorig, a rm -rf could probably be used.
Yes, something like this:
%pre javadoc
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
...which depending on one's taste may need even more sanity tests. But even
without those additional tests, the %pretrans approach looks more appealing to
me than the above (which however in my opinion isn't out of the question
either).