[68698] branches/release_1_9

jmr at macports.org jmr at macports.org
Thu Jun 10 08:52:48 PDT 2010


Revision: 68698
          http://trac.macports.org/changeset/68698
Author:   jmr at macports.org
Date:     2010-06-10 08:52:44 -0700 (Thu, 10 Jun 2010)
Log Message:
-----------
merge r68697 from trunk:
 fix case of incorrectly trying to deactivate when using direct mode, and make the activate and deactivate targets noops in that situation, but run them in order to execute the pre and post procs (#11562)

Revision Links:
--------------
    http://trac.macports.org/changeset/68697

Modified Paths:
--------------
    branches/release_1_9/base/src/macports1.0/macports.tcl
    branches/release_1_9/base/src/port/port.tcl
    branches/release_1_9/base/src/port1.0/portactivate.tcl
    branches/release_1_9/base/src/port1.0/portdeactivate.tcl
    branches/release_1_9/base/src/registry2.0/portuninstall.tcl

Property Changed:
----------------
    branches/release_1_9/
    branches/release_1_9/base/
    branches/release_1_9/base/portmgr/fedora/macports.spec
    branches/release_1_9/base/src/pextlib1.0/sha2.c
    branches/release_1_9/base/src/pextlib1.0/sha2.h
    branches/release_1_9/base/src/pextlib1.0/sha256cmd.c
    branches/release_1_9/base/src/pextlib1.0/sha256cmd.h
    branches/release_1_9/base/src/registry2.0/receipt_sqlite.tcl


Property changes on: branches/release_1_9
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:67304-67305,67307,67384,67447,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691
   + /trunk:67304-67305,67307,67384,67447,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691,68697


Property changes on: branches/release_1_9/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:67304-67305,67307,67384,67447,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:67304-67305,67307,67384,67447,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691,68697
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692


Property changes on: branches/release_1_9/base/portmgr/fedora/macports.spec
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/portmgr/fedora/macports.spec:37343-46937
/branches/universal-sanity/base/portmgr/fedora/macports.spec:51872-52323
/branches/variant-descs-14482/base/portmgr/fedora/macports.spec:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/portmgr/fedora/macports.spec:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691
/trunk/base/portmgr/fedora/macports.spec.in:30388-57826
/users/perry/base-bugs_and_notes/portmgr/fedora/macports.spec:45682-46060
/users/perry/base-select/portmgr/fedora/macports.spec:44044-44692
   + /branches/gsoc08-privileges/base/portmgr/fedora/macports.spec:37343-46937
/branches/universal-sanity/base/portmgr/fedora/macports.spec:51872-52323
/branches/variant-descs-14482/base/portmgr/fedora/macports.spec:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/portmgr/fedora/macports.spec:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691,68697
/trunk/base/portmgr/fedora/macports.spec.in:30388-57826
/users/perry/base-bugs_and_notes/portmgr/fedora/macports.spec:45682-46060
/users/perry/base-select/portmgr/fedora/macports.spec:44044-44692

Modified: branches/release_1_9/base/src/macports1.0/macports.tcl
===================================================================
--- branches/release_1_9/base/src/macports1.0/macports.tcl	2010-06-10 15:43:52 UTC (rev 68697)
+++ branches/release_1_9/base/src/macports1.0/macports.tcl	2010-06-10 15:52:44 UTC (rev 68698)
@@ -1634,11 +1634,6 @@
     }
 
     set clean 0
-    if {[string equal $target "install"] && [string equal ${macports::registry.installtype} "image"]} {
-        # If we're doing image installs, then we should activate after install
-        # xxx: This isn't pretty
-        set target activate
-    }
     if {[string equal ${macports::portautoclean} "yes"] && ([string equal $target "install"] || [string equal $target "activate"])} {
         # If we're doing an install, check if we should clean after
         set clean 1


Property changes on: branches/release_1_9/base/src/pextlib1.0/sha2.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.c:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.c:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.c:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.c:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.c:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.c:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691,68697
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.c:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.c:44044-44692


Property changes on: branches/release_1_9/base/src/pextlib1.0/sha2.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.h:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.h:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.h:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.h:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.h:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.h:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691,68697
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.h:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.h:44044-44692


Property changes on: branches/release_1_9/base/src/pextlib1.0/sha256cmd.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.c:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.c:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.c:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.c:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.c:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.c:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.c:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.c:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691,68697
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.c:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.c:44044-44692


Property changes on: branches/release_1_9/base/src/pextlib1.0/sha256cmd.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.h:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.h:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.h:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.h:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.h:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.h:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.h:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.h:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691,68697
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.h:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.h:44044-44692

Modified: branches/release_1_9/base/src/port/port.tcl
===================================================================
--- branches/release_1_9/base/src/port/port.tcl	2010-06-10 15:43:52 UTC (rev 68697)
+++ branches/release_1_9/base/src/port/port.tcl	2010-06-10 15:52:44 UTC (rev 68698)
@@ -2225,7 +2225,7 @@
 
             set i [lindex $ilist 0]
             set regref [registry::entry open $portname [lindex $i 1] [lindex $i 2] [lindex $i 3] [lindex $i 5]]
-            if {[registry::run_target $regref activate [array get options]]} {
+            if {[$regref installtype] == "image" && [registry::run_target $regref activate [array get options]]} {
                 continue
             }
         }
@@ -2262,7 +2262,7 @@
             set ivariants [lindex $i 3]
             if {$composite_version == "" || $composite_version == "${iversion}_${irevision}${ivariants}"} {
                 set regref [registry::entry open $portname $iversion $irevision $ivariants [lindex $i 5]]
-                if {[registry::run_target $regref deactivate [array get options]]} {
+                if {[$regref installtype] == "image" && [registry::run_target $regref deactivate [array get options]]} {
                     continue
                 }
             }
@@ -3577,7 +3577,6 @@
     if {[require_portlist portlist]} {
         return 1
     }
-    set target $action
     foreachport $portlist {
         # If we have a url, use that, since it's most specific
         # otherwise try to map the portname to a url
@@ -3622,8 +3621,12 @@
             set options(ports_version_glob) $portversion
         }
         # if installing, mark the port as explicitly requested
-        if {$target == "install"} {
+        if {$action == "install"} {
             set options(ports_requested) 1
+            # we actually activate as well
+            set target activate
+        } else {
+            set target $action
         }
         if {[catch {set workername [mportopen $porturl [array get options] [array get requested_variations]]} result]} {
             global errorInfo

Modified: branches/release_1_9/base/src/port1.0/portactivate.tcl
===================================================================
--- branches/release_1_9/base/src/port1.0/portactivate.tcl	2010-06-10 15:43:52 UTC (rev 68697)
+++ branches/release_1_9/base/src/port1.0/portactivate.tcl	2010-06-10 15:52:44 UTC (rev 68698)
@@ -54,17 +54,21 @@
 default activate.asroot no
 
 proc portactivate::activate_start {args} {
-    global prefix
-    if { ![file writable $prefix] } {
+    global prefix registry.installtype
+    if { ![file writable $prefix] && ${registry.installtype} == "image"} {
         # if install location is not writable, need root privileges
         elevateToRoot "activate"
     }
 }
 
 proc portactivate::activate_main {args} {
-    global env name version revision portvariants user_options PortInfo
-    registry_activate $name "${version}_${revision}${portvariants}" [array get user_options]
+    global env name version revision portvariants user_options PortInfo registry.installtype
 
+    # skip the actual activation in direct mode (we still want the notes and the pre/post procs)
+    if {${registry.installtype} == "image"} {
+        registry_activate $name "${version}_${revision}${portvariants}" [array get user_options]
+    }
+
     # Display notes at the end of the activation phase.
     if {[info exists PortInfo(notes)] && $PortInfo(notes) ne {}} {
         ui_msg ""

Modified: branches/release_1_9/base/src/port1.0/portdeactivate.tcl
===================================================================
--- branches/release_1_9/base/src/port1.0/portdeactivate.tcl	2010-06-10 15:43:52 UTC (rev 68697)
+++ branches/release_1_9/base/src/port1.0/portdeactivate.tcl	2010-06-10 15:52:44 UTC (rev 68698)
@@ -49,15 +49,18 @@
 default deactivate.asroot no
 
 proc portdeactivate::deactivate_start {args} {
-    global prefix
-    if { ![file writable $prefix] } {
+    global prefix registry.installtype
+    if { ![file writable $prefix] && ${registry.installtype} == "image"} {
         # if install location is not writable, need root privileges
         elevateToRoot "deactivate"
     }
 }
 
 proc portdeactivate::deactivate_main {args} {
-    global name version revision portvariants user_options
-    registry_deactivate $name "${version}_${revision}${portvariants}" [array get user_options]
+    global name version revision portvariants user_options registry.installtype
+    # we still want to be able to run this target in direct mode for the pre/post procs
+    if {${registry.installtype} == "image"}
+        registry_deactivate $name "${version}_${revision}${portvariants}" [array get user_options]
+    }
     return 0
 }

Modified: branches/release_1_9/base/src/registry2.0/portuninstall.tcl
===================================================================
--- branches/release_1_9/base/src/registry2.0/portuninstall.tcl	2010-06-10 15:43:52 UTC (rev 68697)
+++ branches/release_1_9/base/src/registry2.0/portuninstall.tcl	2010-06-10 15:52:44 UTC (rev 68698)
@@ -147,7 +147,9 @@
                 ui_msg "For $portname @${v}: skipping deactivate (dry run)"
             } else {
                 if {[info exists options(ports_uninstall_no-exec)] || ![registry::run_target $port deactivate $optionslist]} {
-                    portimage::deactivate $portname $v [array get options]
+                    if {[$port installtype] == "image"} {
+                        portimage::deactivate $portname $v [array get options]
+                    }
                 }
             }
         }


Property changes on: branches/release_1_9/base/src/registry2.0/receipt_sqlite.tcl
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/registry1.0/receipt_sqlite.tcl:37343-46937
/branches/gsoc09-logging/base/src/registry1.0/receipt_sqlite.tcl:51231-60371
/branches/universal-sanity/base/src/registry1.0/receipt_sqlite.tcl:51872-52323
/branches/variant-descs-14482/base/src/registry1.0/receipt_sqlite.tcl:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/registry2.0/receipt_sqlite.tcl:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691
/users/perry/base-bugs_and_notes/src/registry1.0/receipt_sqlite.tcl:45682-46060
/users/perry/base-select/src/registry1.0/receipt_sqlite.tcl:44044-44692
   + /branches/gsoc08-privileges/base/src/registry1.0/receipt_sqlite.tcl:37343-46937
/branches/gsoc09-logging/base/src/registry1.0/receipt_sqlite.tcl:51231-60371
/branches/universal-sanity/base/src/registry1.0/receipt_sqlite.tcl:51872-52323
/branches/variant-descs-14482/base/src/registry1.0/receipt_sqlite.tcl:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/registry2.0/receipt_sqlite.tcl:67304-67305,67307,67384,67449,67451,67487,67593,67595,67763,67792,67838,68058,68281,68286,68288,68413,68416,68463,68593,68620,68675-68676,68680,68683-68684,68691,68697
/users/perry/base-bugs_and_notes/src/registry1.0/receipt_sqlite.tcl:45682-46060
/users/perry/base-select/src/registry1.0/receipt_sqlite.tcl:44044-44692
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100610/6fc0112c/attachment-0001.html>


More information about the macports-changes mailing list