[csw-devel] SF.net SVN: gar:[7781] csw/mgar/pkg/texinfo/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Mon Dec 28 15:09:29 CET 2009


Revision: 7781
          http://gar.svn.sourceforge.net/gar/?rev=7781&view=rev
Author:   dmichelsen
Date:     2009-12-28 14:09:26 +0000 (Mon, 28 Dec 2009)

Log Message:
-----------
texinfo: Make postinstall sparse-root aware

Modified Paths:
--------------
    csw/mgar/pkg/texinfo/trunk/checksums
    csw/mgar/pkg/texinfo/trunk/files/CSWtexinfo.postinstall

Modified: csw/mgar/pkg/texinfo/trunk/checksums
===================================================================
--- csw/mgar/pkg/texinfo/trunk/checksums	2009-12-28 14:07:39 UTC (rev 7780)
+++ csw/mgar/pkg/texinfo/trunk/checksums	2009-12-28 14:09:26 UTC (rev 7781)
@@ -1,3 +1,3 @@
-e125eda2f15f31ec8d4b0d34be449aae  CSWtexinfo.postinstall
+cedd1943a435e39a6d147680e0693bd1  CSWtexinfo.postinstall
 f5860ae7b0ff06605975c93e2f59fc07  mkdirentries
 71ba711519209b5fb583fed2b3d86fcb  texinfo-4.13a.tar.gz

Modified: csw/mgar/pkg/texinfo/trunk/files/CSWtexinfo.postinstall
===================================================================
--- csw/mgar/pkg/texinfo/trunk/files/CSWtexinfo.postinstall	2009-12-28 14:07:39 UTC (rev 7780)
+++ csw/mgar/pkg/texinfo/trunk/files/CSWtexinfo.postinstall	2009-12-28 14:09:26 UTC (rev 7781)
@@ -2,11 +2,18 @@
 
 BASE=${PKG_INSTALL_ROOT}/opt/csw
 
-echo "Registering existing texinfo-files..."
+# Does it exist and is writable or can at least be created?
+# This must be tested as we may be inside a sparse zone without
+# write access to $BASE.
+if test -f ${BASE}/share/info/dir -a -w ${BASE}/share/info/dir || \
+   touch ${BASE}/share/info/dir 2>/dev/null; then
 
-FILES=`ls $BASE/share/info/*.info $BASE/share/info/*.info-*`
+  echo "Registering existing texinfo-files..."
+  FILES=`ls ${BASE}/share/info/*.info ${BASE}/share/info/*.info-*`
+  for i in $FILES; do
+    ${BASE}/bin/install-info $i ${BASE}/share/info/dir 2> /dev/null
+  done
+else
+  echo "Skip registering pages as ${BASE}/share/info/dir is not writable"
+fi
 
-for i in $FILES; do
-        /opt/csw/bin/install-info $i $BASE/share/info/dir 2> /dev/null
-done
-


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list