[70543] branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
and.damore at macports.org
and.damore at macports.org
Thu Aug 12 13:45:44 PDT 2010
Revision: 70543
http://trac.macports.org/changeset/70543
Author: and.damore at macports.org
Date: 2010-08-12 13:45:42 -0700 (Thu, 12 Aug 2010)
Log Message:
-----------
copying config files rather than hardlinking, fixed small glitches
Modified Paths:
--------------
branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
Modified: branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl 2010-08-12 19:46:03 UTC (rev 70542)
+++ branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl 2010-08-12 20:45:42 UTC (rev 70543)
@@ -406,12 +406,20 @@
}
return 0
}
- default {
- ui_debug "activating file: $dstfile"
- # Try a hard link first and if that fails, a symlink
- if {[catch {file link -hard $dstfile $srcfile}]} {
- ui_debug "hardlinking $srcfile to $dstfile failed, symlinking instead"
- file link -symbolic $dstfile $srcfile
+ default {
+ 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"
+ ui_debug "copying $srcfile to $dstfile as it is a config file"
+ file copy $srcfile $dstfile
+ } else {
+ puts "GSOCDBG:\tlinking $srcfile to $dstfile as it is a config file"
+ # Try a hard link first and if that fails, a symlink
+ if {[catch {file link -hard $dstfile $srcfile}]} {
+ ui_debug "hardlinking $srcfile to $dstfile failed, symlinking instead"
+ file link -symbolic $dstfile $srcfile
+ }
}
return 1
}
@@ -744,15 +752,15 @@
if {[catch {md5 file "$file"} actual_md5] == 0} {
set stored_md5 [dict get $imagefiles_with_md5 $file]
puts "GSOCDBG:\t\tactual_md5:$actual_md5\tstored_md5:$stored_md5"
- if {![string compare -nocase \
+ if {[string equal -nocase \
$actual_md5 $stored_md5]} {
puts "GSOCDBG:\t\tnot modified file:$file"
} else {
puts "GSOCDBG:\t\tmodified file:$file - PLEASE RUN port upgrade config-upgrade"
+ continue
}
- continue
} else {
- puts "could'nt catch md5"
+ puts "couldn't catch md5"
}
}
_deactivate_file $file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100812/33a7e09a/attachment.html>
More information about the macports-changes
mailing list