[66775] trunk/base

jmr at macports.org jmr at macports.org
Thu Apr 22 12:51:06 PDT 2010


Revision: 66775
          http://trac.macports.org/changeset/66775
Author:   jmr at macports.org
Date:     2010-04-22 12:51:04 -0700 (Thu, 22 Apr 2010)
Log Message:
-----------
add var/macports/packages to prefix.mtree, only warn and disable archive mode if it is missing and cannot be created (#17579)

Modified Paths:
--------------
    trunk/base/doc/prefix.mtree.in
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/doc/prefix.mtree.in
===================================================================
--- trunk/base/doc/prefix.mtree.in	2010-04-22 19:31:23 UTC (rev 66774)
+++ trunk/base/doc/prefix.mtree.in	2010-04-22 19:51:04 UTC (rev 66775)
@@ -247,6 +247,8 @@
             ..
             logs
             ..
+            packages
+            ..
             receipts
             ..
             registry

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2010-04-22 19:31:23 UTC (rev 66774)
+++ trunk/base/src/macports1.0/macports.tcl	2010-04-22 19:51:04 UTC (rev 66775)
@@ -668,19 +668,12 @@
         global macports::portarchivepath
     }
     if {$portarchivemode == "yes"} {
-        if {![file isdirectory $portarchivepath]} {
-            if {![file exists $portarchivepath]} {
-                if {![file owned $portdbpath]} {
-                    file lstat $portdbpath stat
-                    return -code error "insufficient privileges for portdbpath $portdbpath (uid $stat(uid)); cannot create portarchivepath"
-                } elseif {[catch {file mkdir $portarchivepath} result]} {
-                    return -code error "portarchivepath $portarchivepath does not exist and could not be created: $result"
-                }
-            }
+        if {![file exists $portarchivepath] && [catch {file mkdir $portarchivepath} result]} {
+            ui_warn "portarchivepath $portarchivepath does not exist and could not be created; disabling archive mode"
+            set portarchivemode no
+        } elseif {![file isdirectory $portarchivepath]} {
+            return -code error "Archive dir $portarchivepath is not a directory. Please create the directory or reconfigure portarchivepath"
         }
-        if {![file isdirectory $portarchivepath]} {
-            return -code error "$portarchivepath is not a directory. Please create the directory $portarchivepath and try again"
-        }
     }
 
     # Archive type, what type of binary archive to use (CPIO, gzipped
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100422/4bd7a91c/attachment.html>


More information about the macports-changes mailing list