javadoc scriptlets

Jason L Tibbitts III tibbs at math.uh.edu
Thu Nov 22 05:18:21 UTC 2007


I'm having trouble understanding why many Java-using packages have the
following scriptlets:

%post javadoc
%__rm -f %{_javadocdir}/%{name}
%__ln_s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ $1 -eq 0 ]; then
  %__rm -f %{_javadocdir}/%{name}
fi

So at install time it makes a symlink to a directory installed by the
javadoc package, and at uninstall time it removes it.

Some packages don't seem to %ghost the link, which seems to be a
problem.  But a more burning question is why isn't the link just part
of the package?

I was grepping through some specs and I found this from the (now
retired) jogl package:

* Sat Sep  3 2005 Anthony Green <green at redhat.com> - 0:1.1.1-7
- Removed %ghost for javadoc, and remove javadoc post scriptlet,
  as per ville.skytta at iki.fi's suggestion.

But I don't know what the basis for that was, and I don't see anything
relevant in bugzilla.  Perhaps Ville can remember that far back.

Does anyone know the rationale for this?

 - J<




More information about the devel mailing list