[fedora-java] FindBugs 2.0.2 update coming to F19/F20

Richard Fearn richardfearn at gmail.com
Sat Dec 28 00:58:55 UTC 2013


On 19 November 2013 22:07, puntogil at libero.it <puntogil at libero.it> wrote:
> there is only a problem in your spec file
> mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
> cp -a apiJavaDoc $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
> ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
> must be
> cp -a apiJavaDoc $RPM_BUILD_ROOT%{_javadocdir}/%{name}
> see https://fedoraproject.org/wiki/Packaging:Java#Javadoc_installation

I'm trying to make this change work nicely for F20, but can't get it to work.

At the moment the F20 package has this:

$ ls -ld /usr/share/javadoc/findbugs*
lrwxrwxrwx. 1 root root   14 Dec 28 00:52 /usr/share/javadoc/findbugs
-> findbugs-2.0.2
drwxr-xr-x. 5 root root 4096 Dec 28 00:52 /usr/share/javadoc/findbugs-2.0.2

If I just change the spec to install Javadoc into
/usr/share/javadoc/findbugs, obviously the package upgrade fails due
to a conflict (symlink changing to directory).

I tried this:

%pretrans javadoc
if [ -h %{_javadocdir}/%{name} ]; then
  rm -f %{_javadocdir}/%{name}

but after the upgrade, while /usr/share/javadoc/findbugs exists and is
a directory, and contains the new Javadoc,
/usr/share/javadoc/findbugs-2.0.2 *also* still exists, and contains
all the old Javadoc (now unowned by any package). I expected
/usr/share/javadoc/findbugs-2.0.2 to be deleted. Doing the upgrade
with `rpm -Uvvh` shows that rpm skips the erase of the Javadoc under

What am I doing wrong?



Richard Fearn
richardfearn at gmail.com

More information about the java-devel mailing list