fix scriptlet noise caused by 2.10.0 search index changes
This commit is contained in:
parent
8f4f69019c
commit
f7bd324978
|
@ -1,5 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Determine R versions
|
||||||
|
R_SUPER_VERSION=`R --version | grep "R version" | cut -d " " -f 3 | cut -d "." -f 1`
|
||||||
|
R_MAJOR_VERSION=`R --version | grep "R version" | cut -d " " -f 3 | cut -d "." -f 2`
|
||||||
|
|
||||||
|
# If R 3.0.* ever comes out, we'll need to revisit this logic.
|
||||||
|
# Or, just nuke this script and the macros entirely.
|
||||||
|
if [ "$R_SUPER_VERSION" -ge "2" -a "$R_MAJOR_VERSION" -ge "10" ]; then
|
||||||
|
# echo "R is new enough to not need this anymore."
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
|
||||||
# Figure out what RHOME is set to
|
# Figure out what RHOME is set to
|
||||||
TMP_R_HOME=`R RHOME`
|
TMP_R_HOME=`R RHOME`
|
||||||
|
|
||||||
|
@ -17,5 +28,7 @@ cat /usr/share/R/library/*/CONTENTS >> $TMP_R_DOC_DIR/html/search/index.txt 2>/d
|
||||||
# Don't use .. based paths, substitute /usr/share/R
|
# Don't use .. based paths, substitute /usr/share/R
|
||||||
sed -i "s!../../..!/usr/share/R!g" $TMP_R_DOC_DIR/html/search/index.txt
|
sed -i "s!../../..!/usr/share/R!g" $TMP_R_DOC_DIR/html/search/index.txt
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
17
R.spec
17
R.spec
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
Name: R
|
Name: R
|
||||||
Version: 2.10.0
|
Version: 2.10.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A language for data analysis and graphics
|
Summary: A language for data analysis and graphics
|
||||||
URL: http://www.r-project.org
|
URL: http://www.r-project.org
|
||||||
Source0: ftp://cran.r-project.org/pub/R/src/base/R-2/R-%{version}.tar.gz
|
Source0: ftp://cran.r-project.org/pub/R/src/base/R-2/R-%{version}.tar.gz
|
||||||
|
@ -847,15 +847,17 @@ R CMD javareconf \
|
||||||
JAVA_LD_LIBRARY_PATH=%{_jvmdir}/jre/lib/%{java_arch}/server:%{_jvmdir}/jre/lib/%{java_arch}:%{_jvmdir}/java/lib/%{java_arch}:/usr/java/packages/lib/%{java_arch}:/lib:/usr/lib \
|
JAVA_LD_LIBRARY_PATH=%{_jvmdir}/jre/lib/%{java_arch}/server:%{_jvmdir}/jre/lib/%{java_arch}:%{_jvmdir}/java/lib/%{java_arch}:/usr/java/packages/lib/%{java_arch}:/lib:/usr/lib \
|
||||||
> /dev/null 2>&1 || exit 0
|
> /dev/null 2>&1 || exit 0
|
||||||
|
|
||||||
|
# With 2.10.0, we no longer need to do any of this.
|
||||||
|
|
||||||
# Update package indices
|
# Update package indices
|
||||||
%__cat %{_libdir}/R/library/*/CONTENTS > %{_docdir}/R-%{version}/html/search/index.txt 2>/dev/null
|
# %__cat %{_libdir}/R/library/*/CONTENTS > %{_docdir}/R-%{version}/html/search/index.txt 2>/dev/null
|
||||||
# Don't use .. based paths, substitute RHOME
|
# Don't use .. based paths, substitute RHOME
|
||||||
sed -i "s!../../..!%{_libdir}/R!g" %{_docdir}/R-%{version}/html/search/index.txt
|
# sed -i "s!../../..!%{_libdir}/R!g" %{_docdir}/R-%{version}/html/search/index.txt
|
||||||
|
|
||||||
# This could fail if there are no noarch R libraries on the system.
|
# This could fail if there are no noarch R libraries on the system.
|
||||||
%__cat %{_datadir}/R/library/*/CONTENTS >> %{_docdir}/R-%{version}/html/search/index.txt 2>/dev/null || exit 0
|
# %__cat %{_datadir}/R/library/*/CONTENTS >> %{_docdir}/R-%{version}/html/search/index.txt 2>/dev/null || exit 0
|
||||||
# Don't use .. based paths, substitute /usr/share/R
|
# Don't use .. based paths, substitute /usr/share/R
|
||||||
sed -i "s!../../..!/usr/share/R!g" %{_docdir}/R-%{version}/html/search/index.txt
|
# sed -i "s!../../..!/usr/share/R!g" %{_docdir}/R-%{version}/html/search/index.txt
|
||||||
|
|
||||||
|
|
||||||
%preun core
|
%preun core
|
||||||
|
@ -896,6 +898,11 @@ R CMD javareconf \
|
||||||
%postun -n libRmath -p /sbin/ldconfig
|
%postun -n libRmath -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 9 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.10.0-2
|
||||||
|
- get rid of index.txt scriptlet on R-core (bz 533572)
|
||||||
|
- leave macro in place, but don't call /usr/lib/rpm/R-make-search-index.sh equivalent anymore
|
||||||
|
- add version check to see if we need to run R-make-search-index.sh guts
|
||||||
|
|
||||||
* Wed Nov 4 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.10.0-1
|
* Wed Nov 4 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.10.0-1
|
||||||
- update to 2.10.0
|
- update to 2.10.0
|
||||||
- use correct compiler for ARM
|
- use correct compiler for ARM
|
||||||
|
|
Loading…
Reference in New Issue