[24072] trunk/base
source_changes at macosforge.org
source_changes at macosforge.org
Sun Apr 15 22:02:00 PDT 2007
Revision: 24072
http://trac.macosforge.org/projects/macports/changeset/24072
Author: jberry at macports.org
Date: 2007-04-15 22:01:59 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
Now that the configuration parser is cleaned up, it accepts lines that
later break. Fix the breakage by allowing arbitrary data to be set
in the conf variables, and fix the rsync_options variable in the
conf file (the value shouldn't have been quoted).
Since lots of users will have such bogus rsync_options, put in a special
case to strip quotes for in the conf value for that case.
Modified Paths:
--------------
trunk/base/ChangeLog
trunk/base/doc/ports.conf.in
trunk/base/src/darwinports1.0/darwinports.tcl
Modified: trunk/base/ChangeLog
===================================================================
--- trunk/base/ChangeLog 2007-04-16 04:09:41 UTC (rev 24071)
+++ trunk/base/ChangeLog 2007-04-16 05:01:59 UTC (rev 24072)
@@ -16,6 +16,7 @@
- ~/.macports/ports.conf
- ${prefix}/etc/ports.conf
Only the first file found will be parsed and used.
+ (jberry r24071)
Release 1.4.1 (14-Apr-2007):
Modified: trunk/base/doc/ports.conf.in
===================================================================
--- trunk/base/doc/ports.conf.in 2007-04-16 04:09:41 UTC (rev 24071)
+++ trunk/base/doc/ports.conf.in 2007-04-16 05:01:59 UTC (rev 24072)
@@ -47,7 +47,7 @@
rsync_dir dpupdate1/base/
# Rsync options
-rsync_options "-rtzv --delete --delete-after"
+rsync_options -rtzv --delete --delete-after
# Options for generated startup items
# startupitem_type may be "default", "systemstarter", or "launchd";
Modified: trunk/base/src/darwinports1.0/darwinports.tcl
===================================================================
--- trunk/base/src/darwinports1.0/darwinports.tcl 2007-04-16 04:09:41 UTC (rev 24071)
+++ trunk/base/src/darwinports1.0/darwinports.tcl 2007-04-16 05:01:59 UTC (rev 24072)
@@ -49,7 +49,7 @@
portarchivetype portautoclean porttrace portverbose destroot_umask rsync_server \
rsync_options rsync_dir startupitem_type \
$user_options"
-
+
# deferred options are only computed when needed.
# they are not exported to the trace thread.
# they are not exported to the interpreter in system_options array.
@@ -215,9 +215,14 @@
# Process the first configuration file we find on conf_files list
foreach file $conf_files {
if [file exists $file] {
+ set portconf $file
set fd [open $file r]
while {[gets $fd line] >= 0} {
if {[regexp {^(\w+)([ \t]+(.*))?$} $line match option ignore val] == 1} {
+ if {[regexp {^"(.*)"[ \t]*$} $val match val2] == 1} {
+ # Nasty hack for malformed rsync_options in ports.conf
+ set val $val2
+ }
if {[lsearch $bootstrap_options $option] >= 0} {
set darwinports::$option $val
global darwinports::$option
@@ -547,8 +552,8 @@
global darwinports::$opt
}
if {[info exists $opt]} {
- $workername eval set system_options($opt) \"[set $opt]\"
- $workername eval set $opt \"[set $opt]\"
+ $workername eval set system_options($opt) \{[set $opt]\}
+ $workername eval set $opt \{[set $opt]\}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070415/0d254c39/attachment.html
More information about the macports-changes
mailing list