[csw-devel] SF.net SVN: gar:[6155] csw/mgar/pkg/unixodbc/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue Sep 1 20:22:23 CEST 2009


Revision: 6155
          http://gar.svn.sourceforge.net/gar/?rev=6155&view=rev
Author:   wahwah
Date:     2009-09-01 18:22:23 +0000 (Tue, 01 Sep 2009)

Log Message:
-----------
unixodbc: File migration postinstall, handling an already existing symbolic link

Modified Paths:
--------------
    csw/mgar/pkg/unixodbc/trunk/checksums
    csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc.postinstall

Modified: csw/mgar/pkg/unixodbc/trunk/checksums
===================================================================
--- csw/mgar/pkg/unixodbc/trunk/checksums	2009-09-01 18:12:04 UTC (rev 6154)
+++ csw/mgar/pkg/unixodbc/trunk/checksums	2009-09-01 18:22:23 UTC (rev 6155)
@@ -1,2 +1,2 @@
-a3e220ed8b903f2bc8d8ac2654071f9a  download/CSWunixodbc.postinstall
+ccfa98210f71e0322cf3cab3b5ddd0d0  download/CSWunixodbc.postinstall
 f47c2efb28618ecf5f33319140a7acd0  download/unixODBC-2.2.14.tar.gz

Modified: csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc.postinstall
===================================================================
--- csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc.postinstall	2009-09-01 18:12:04 UTC (rev 6154)
+++ csw/mgar/pkg/unixodbc/trunk/files/CSWunixodbc.postinstall	2009-09-01 18:22:23 UTC (rev 6155)
@@ -56,7 +56,10 @@
   dubdots=`gen_dubdots "${new_location}"`
   if [ -r "${abs_old_location}" ]; then
     drop_warning "${abs_old_location}"
-    if [ -r "${abs_new_location}" ]; then
+    if [ -h "${abs_new_location}" ]; then
+      # It's a symbolic link already, doing nothing.
+      true
+    elif [ -r "${abs_new_location}" ]; then
       if files_are_identical "${abs_new_location}" "${abs_new_location}.CSW"; then
         rm "${abs_new_location}"
         ln -s "${dubdots}${old_location_noslash}" "${abs_new_location}"
@@ -64,7 +67,7 @@
         touch "${abs_old_location}.THIS_FILE_IS_PROBABLY_UNUSED"
       fi
     else
-      # The file doesn't exist.
+      # The file or directory doesn't exist.
       ln -s "${dubdots}${old_location_noslash}" "${abs_new_location}"
     fi
   fi


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