[70587] branches/gsoc10-configfiles/base/src/registry2.0

and.damore at macports.org and.damore at macports.org
Sat Aug 14 09:51:35 PDT 2010


Revision: 70587
          http://trac.macports.org/changeset/70587
Author:   and.damore at macports.org
Date:     2010-08-14 09:51:34 -0700 (Sat, 14 Aug 2010)
Log Message:
-----------
added puts in portimage for debugging purpose

Modified Paths:
--------------
    branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
    branches/gsoc10-configfiles/base/src/registry2.0/registry_util.tcl

Modified: branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl	2010-08-14 16:43:08 UTC (rev 70586)
+++ branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl	2010-08-14 16:51:34 UTC (rev 70587)
@@ -80,6 +80,7 @@
     variable noexec
     variable is_upgrade
 
+    puts "GSOCDBG:\tactivate is_upgrade:$is_upgrade"
     if {[info exists options(ports_force)] && [string is true -strict $options(ports_force)] } {
         set force 1
     }
@@ -127,6 +128,7 @@
         if {$todeactivate ne ""} {set is_upgrade 1}
         foreach a $todeactivate {
             if {$noexec || ![registry::run_target $a deactivate [list ports_nodepcheck 1]]} {
+                puts "GSOCDBG:\t\tactivate called deactivate via direct call"
                 deactivate $name "[$a version]_[$a revision][$a variants]" [list ports_nodepcheck 1]
             }
         }
@@ -206,7 +208,7 @@
     variable use_reg2
     variable is_upgrade
 
-    puts "GSOCDBG:\tdeactivate\tis_upgrade:$is_upgrade"
+    puts "GSOCDBG:\tdeactivate is_upgrade:$is_upgrade"
     if {[info exists options(ports_force)] && [string is true -strict $options(ports_force)] } {
         # this not using the namespace variable is correct, since activate
         # needs to be able to force deactivate independently of whether
@@ -277,6 +279,10 @@
             registry::check_dependents $requested $force
         }
 
+        #   put check for config-upgrade here, with AND on $is_upgrade, \
+            this way the actual _deactivate_contents won't start until there's \
+            some config file to upgrade, unless a forcing options has been \
+            provided on CLI
         _deactivate_contents $requested [$requested files] [$requested files_with_md5] $force
 
         $requested state imaged
@@ -417,7 +423,7 @@
             ui_debug "activating file: $dstfile"           
             # copy config files rather than hardlink them
             if { [is_config_file $dstfile]} {
-                puts "GSOCDBG:\tcopying $srcfile to $dstfile as it is a config file"
+                puts "GSOCDBG:\t\tcopying $srcfile to $dstfile as it is a config file"
                 ui_debug "copying $srcfile to $dstfile as it is a config file"
                 file copy $srcfile $dstfile
             } else {
@@ -754,7 +760,7 @@
                             set stored_md5 [dict get $imagefiles_with_md5 $file]
                             if {[string equal -nocase \
                                     $actual_md5 $stored_md5]} {
-                                puts "GSOCDBG:\t\tnot modified file:$file"
+                                puts "GSOCDBG:\t\tnot modified file:$file - deactivating it"
                             } else {
                                 puts "GSOCDBG:\t\tmodified file:$file - PLEASE RUN port upgrade config-upgrade"
                                 continue

Modified: branches/gsoc10-configfiles/base/src/registry2.0/registry_util.tcl
===================================================================
--- branches/gsoc10-configfiles/base/src/registry2.0/registry_util.tcl	2010-08-14 16:43:08 UTC (rev 70586)
+++ branches/gsoc10-configfiles/base/src/registry2.0/registry_util.tcl	2010-08-14 16:51:34 UTC (rev 70587)
@@ -82,6 +82,9 @@
 ## runs the given target of the given port using its stored portfile
 ## @return   true if successful, false otherwise
 proc run_target {port target options} {
+    if {$target eq "deactivate"} {
+        puts "GSOCDBG:\t\tactivate called deactivate via registry::"
+    }
     set portspec "[$port name] @[$port version]_[$port revision][$port variants]"
     if {[$port portfile] == ""} {
         ui_debug "no portfile in registry for $portspec"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100814/dc53ed71/attachment-0001.html>


More information about the macports-changes mailing list