On Wednesday 17 November 2010, Kevin Kofler wrote:
Ville Skyttä wrote:
> I'd get rid of the versioned javadoc dir altogether, and simply install
> to %{_javadocdir}/%{name}. Unversioned is good for bookmarking and
> javadoc crosslinking.
One thing you have to be careful of, no matter which way you decide, is
that you MUST NOT change a directory to a symlink or the other way round
or RPM will get terribly confused on upgrades.
(There are bizarre (and easy to get wrong) scriptlet workarounds that can
be used, but avoiding the mess in the first place is probably the best
solution.)
In this case it's the unversioned dir we want to stay around, so the
scriptlet doesn't have to be any more bizarre than something like this which
IMO isn't that bad (certainly not bad enough to stop implementing the above
plan IMO), and would only be needed in *-javadoc that created an unversioned
symlink, either owned by the package as usual or created "in the wild" in
%post:
%pretrans javadoc -p <lua>
-- TODO: remove this scriptlet in F-17
os.remove("%{_javadocdir}/%{name}")
The F-17 in the comment assumes this stuff is first introduced in F-15, and
that direct upgrades from F-N to F-(N+2) (i.e. skip over one release but not
more) should be supported.