[37780] trunk/base/src/macports1.0/macports.tcl

eridius at macports.org eridius at macports.org
Mon Jun 23 00:00:09 PDT 2008


Revision: 37780
          http://trac.macosforge.org/projects/macports/changeset/37780
Author:   eridius at macports.org
Date:     2008-06-23 00:00:08 -0700 (Mon, 23 Jun 2008)
Log Message:
-----------
Remove some redundant code in mportinit

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2008-06-23 06:33:10 UTC (rev 37779)
+++ trunk/base/src/macports1.0/macports.tcl	2008-06-23 07:00:08 UTC (rev 37780)
@@ -456,23 +456,12 @@
             if {[catch {file mkdir $portdbpath} result]} {
                 return -code error "portdbpath $portdbpath does not exist and could not be created: $result"
             }
+        } else {
+            return -code error "$portdbpath is not a directory. Please create the directory $portdbpath and try again"
         }
     }
-    if {![file isdirectory $portdbpath]} {
-        return -code error "$portdbpath is not a directory. Please create the directory $portdbpath and try again"
-    }
 
     set registry.path $portdbpath
-    if {![file isdirectory ${registry.path}]} {
-        if {![file exists ${registry.path}]} {
-            if {[catch {file mkdir ${registry.path}} result]} {
-                return -code error "portdbpath ${registry.path} does not exist and could not be created: $result"
-            }
-        }
-    }
-    if {![file isdirectory ${macports::registry.path}]} {
-        return -code error "${macports::registry.path} is not a directory. Please create the directory $portdbpath and try again"
-    }
 
     # Format for receipts, can currently be either "flat" or "sqlite"
     if {[info exists portdbformat]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080623/c90ac616/attachment.htm 


More information about the macports-changes mailing list