Il 28/12/2013 01:58, Richard Fearn ha scritto:
Hi,
On 19 November 2013 22:07, puntogil@xxxxxxxxx <puntogil@xxxxxxxxx> 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}
fi
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
findbugs-2.0.2.
What am I doing wrong?
Thanks,
Rich
hi
try with
NOTE: workaround for RPM bug #646523 - can't change symlink to directory
remove this in F-22
%pretrans javadoc -p <lua>
dir = "%{_javadocdir}/%{name}"
dummy = posix.readlink(dir) and os.remove(dir)
or
%pre javadoc
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
regards and happy holydays
- gil
begin:vcard
fn:gil
n:;gil
email;internet:puntogil@xxxxxxxxx
version:2.1
end:vcard
--
java-devel mailing list
java-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/java-devel