[CalendarServer-changes] [9403] CalendarServer/trunk/contrib/migration/calendarmigrator.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Jul 2 22:05:01 PDT 2012


Revision: 9403
          http://trac.macosforge.org/projects/calendarserver/changeset/9403
Author:   sagen at apple.com
Date:     2012-07-02 22:05:00 -0700 (Mon, 02 Jul 2012)
Log Message:
-----------
Don't just rely on directory existence as an indicator that the service data directory is "external" -- do a name comparison because there are some cases where the new server root directory will get created prior to the migration extra running.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/migration/calendarmigrator.py

Modified: CalendarServer/trunk/contrib/migration/calendarmigrator.py
===================================================================
--- CalendarServer/trunk/contrib/migration/calendarmigrator.py	2012-07-02 18:03:38 UTC (rev 9402)
+++ CalendarServer/trunk/contrib/migration/calendarmigrator.py	2012-07-03 05:05:00 UTC (rev 9403)
@@ -651,8 +651,8 @@
         # Before 10.8, DocumentRoot and DataRoot were relative to ServerRoot
 
         if oldServerRootValue:
-            if diskAccessor.exists(oldServerRootValue): # external volume
-                log("Using external calendar server root: %s" % (newServerRoot,))
+            if oldServerRootValue.rstrip("/") != NEW_SERVER_ROOT: # external volume
+                log("Using external calendar server root: %s" % (oldServerRootValue,))
                 # ServerRoot needs to be /Library/Server/Calendar and Contacts
                 # Since DocumentRoot is now relative to DataRoot, move DocumentRoot into DataRoot
                 newDataRoot = newDataRootValue = os.path.join(oldServerRootValue, "Data")
@@ -699,7 +699,7 @@
     else: # 10.8 -> 10.8
 
         if oldServerRootValue:
-            if diskAccessor.exists(oldServerRootValue): # external volume
+            if oldServerRootValue.rstrip("/") != NEW_SERVER_ROOT: # external volume
                 log("Using external calendar server root: %s" % (oldServerRootValue,))
             elif diskAccessor.exists(absolutePathWithRoot(sourceRoot, oldServerRootValue)):
                 log("Copying calendar server root: %s" % (newServerRoot,))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120702/4cdd0610/attachment.html>


More information about the calendarserver-changes mailing list