[70585] branches/gsoc10-configfiles

and.damore at macports.org and.damore at macports.org
Sat Aug 14 09:31:18 PDT 2010


Revision: 70585
          http://trac.macports.org/changeset/70585
Author:   and.damore at macports.org
Date:     2010-08-14 09:31:15 -0700 (Sat, 14 Aug 2010)
Log Message:
-----------
edited config-files tools

Modified Paths:
--------------
    branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
    branches/gsoc10-configfiles/base/src/registry2.0/registry_util.tcl
    branches/gsoc10-configfiles/tools/Portfile
    branches/gsoc10-configfiles/tools/gsocdummyupdate.sh
    branches/gsoc10-configfiles/tools/gsocswitchversion

Modified: branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl	2010-08-14 15:01:10 UTC (rev 70584)
+++ branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl	2010-08-14 16:31:15 UTC (rev 70585)
@@ -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 {
@@ -438,8 +444,10 @@
     variable force
     variable use_reg2
     variable noexec
+    variable is_upgrade
     global macports::prefix
 
+    puts "GSOCDBG:\t\t_activate_contents is_upgrade:$is_upgrade"
     set files [list]
     set baksuffix .mp_[clock seconds]
     if {$use_reg2} {
@@ -754,7 +762,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 15:01:10 UTC (rev 70584)
+++ branches/gsoc10-configfiles/base/src/registry2.0/registry_util.tcl	2010-08-14 16:31:15 UTC (rev 70585)
@@ -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"

Modified: branches/gsoc10-configfiles/tools/Portfile
===================================================================
--- branches/gsoc10-configfiles/tools/Portfile	2010-08-14 15:01:10 UTC (rev 70584)
+++ branches/gsoc10-configfiles/tools/Portfile	2010-08-14 16:31:15 UTC (rev 70585)
@@ -18,6 +18,7 @@
 destroot.args-append    PREFIX=$prefix
 
 
-checksums           md5     3d17a980294fdfcae43fb443281ef593 \
-                    sha1    774ff5faa548aa16ad9a6ecb93f7e844031ac2b3 \
-                    rmd160  6ff94757a7d29ac72ea224b8c1103341499fce6a
+
+checksums           md5     c091a72c2bf94856c6279116657ea1d5 \
+                    sha1    ddafe463a88c06358d70b3b3fd978989faf10c33 \
+                    rmd160  e68c40726c4ca7326b08bd1ccbefa8153ef40e1d

Modified: branches/gsoc10-configfiles/tools/gsocdummyupdate.sh
===================================================================
--- branches/gsoc10-configfiles/tools/gsocdummyupdate.sh	2010-08-14 15:01:10 UTC (rev 70584)
+++ branches/gsoc10-configfiles/tools/gsocdummyupdate.sh	2010-08-14 16:31:15 UTC (rev 70585)
@@ -24,6 +24,7 @@
 sha="                    sha1    $shaHash \\"
 rmd="                    rmd160  $rmdHash"
 
+#   TODO: REPLACE ALL FOLLOWING PART WITH sed -i '' LINES
 read num _ <<< $(wc -l "$PORTFILE")
 head -n $((num-3)) "$PORTFILE" > "$TMPFILE"
 printf "\n%s\n%s\n%s" "$md5" "$sha" "$rmd" >> "$TMPFILE"

Modified: branches/gsoc10-configfiles/tools/gsocswitchversion
===================================================================
--- branches/gsoc10-configfiles/tools/gsocswitchversion	2010-08-14 15:01:10 UTC (rev 70584)
+++ branches/gsoc10-configfiles/tools/gsocswitchversion	2010-08-14 16:31:15 UTC (rev 70585)
@@ -7,10 +7,10 @@
 cd "$PORTPATH"
 if [[ $revision = 0 ]]; then
     echo "0 to 1"
-    sed -e 's,\(revision[ ]*\)0,\11,' Portfile >NewPortfile
+    sed -e 's,\(revision[ ]*\)0,\11,' -i '' Portfile
 else
     echo "1 to 0"
-    sed -e 's,\(revision[ ]*\)1,\10,' Portfile >NewPortfile
+    sed -e 's,\(revision[ ]*\)1,\10,' -i '' Portfile
 fi
-cp Portfile Portfile.backup
-mv NewPortfile Portfile
+#cp Portfile Portfile.backup
+#mv NewPortfile Portfile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100814/45de0a7c/attachment.html>


More information about the macports-changes mailing list