[24452] trunk/base
source_changes at macosforge.org
source_changes at macosforge.org
Tue Apr 24 10:02:07 PDT 2007
Revision: 24452
http://trac.macosforge.org/projects/macports/changeset/24452
Author: eridius at macports.org
Date: 2007-04-24 10:02:07 -0700 (Tue, 24 Apr 2007)
Log Message:
-----------
ln now accepts combined flags (ex. ln -sf foo bar)
ChangeLog entry added
Modified Paths:
--------------
trunk/base/ChangeLog
trunk/base/src/port1.0/portutil.tcl
trunk/base/src/port1.0/tests/portutil.tcl
Modified: trunk/base/ChangeLog
===================================================================
--- trunk/base/ChangeLog 2007-04-24 16:53:19 UTC (rev 24451)
+++ trunk/base/ChangeLog 2007-04-24 17:02:07 UTC (rev 24452)
@@ -6,6 +6,8 @@
(unreleased):
+ - ln now accepts combined flags (ex. ln -sf foo bar) (eridius r24452)
+
- default_variants now handles multiple values correctly (ticket #11828, eridius r24450).
- ln uses new symlink command so it can create symlinks that point to
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2007-04-24 16:53:19 UTC (rev 24451)
+++ trunk/base/src/port1.0/portutil.tcl 2007-04-24 17:02:07 UTC (rev 24452)
@@ -831,7 +831,13 @@
proc ln {args} {
while {[string match -* [lindex $args 0]]} {
set arg [string range [lindex $args 0] 1 end]
- set args [lrange $args 1 end]
+ if {[string length $arg] > 1} {
+ set remainder -[string range $arg 1 end]
+ set arg [string range $arg 0 0]
+ set args [lreplace $args 0 0 $remainder]
+ } else {
+ set args [lreplace $args 0 0]
+ }
switch -- $arg {
f -
h -
Modified: trunk/base/src/port1.0/tests/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/tests/portutil.tcl 2007-04-24 16:53:19 UTC (rev 24451)
+++ trunk/base/src/port1.0/tests/portutil.tcl 2007-04-24 17:02:07 UTC (rev 24452)
@@ -177,6 +177,10 @@
ln -s -f -h z $root/dir
if {[catch {file type $root/dir/z}] || [file type $root/dir/z] ne "link"} { error "ln failed" }
+
+ # test combined flags
+ ln -sf q $root/dir
+ if {[catch {file type $root/dir/q}] || [file type $root/dir/q] ne "link"} { error "ln failed" }
} finally {
file delete -force $root
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070424/3f52560c/attachment.html
More information about the macports-changes
mailing list