Changeset 14506 for trunk/base
- Timestamp:
- Oct 9, 2005, 3:31:28 PM (19 years ago)
- Location:
- trunk/base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/ChangeLog
r14502 r14506 1 1 # 2 # $Id: ChangeLog,v 1. 6 2005/10/09 13:54:26jberry Exp $2 # $Id: ChangeLog,v 1.7 2005/10/09 15:31:27 jberry Exp $ 3 3 # 4 4 # This is a log of major user-visible changes in each release … … 85 85 86 86 - Snazzy new ChangeLog file 87 88 - Add new actions for port(1): help, echo, cat, ed, path, portfile (jberry) 87 89 88 90 -
trunk/base/src/port/port.tcl
r14487 r14506 3 3 exec @TCLSH@ "$0" "$@" 4 4 # port.tcl 5 # $Id: port.tcl,v 1.11 3 2005/10/08 22:24:14jberry Exp $5 # $Id: port.tcl,v 1.114 2005/10/09 15:31:28 jberry Exp $ 6 6 # 7 7 # Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org> … … 50 50 array set global_variations {} 51 51 52 # Save off a copy of the environment before dportinit monkeys with it 53 global env 54 array set boot_env [array get env] 55 52 56 # UI Instantiations 53 57 # ui_options(ports_debug) - If set, output debugging messages. … … 127 131 } 128 132 } 133 129 134 130 135 # Standard procedures … … 1694 1699 } 1695 1700 1696 sync { 1697 if {[catch {dportsync} result]} { 1698 global errorInfo 1699 ui_debug "$errorInfo" 1700 fatal "port sync failed: $result" 1701 } 1702 } 1703 1704 default { 1701 ed - 1702 cat - 1703 path - 1704 portfile { 1705 # Operations on the PortFiles of the port 1705 1706 require_portlist 1706 1707 foreachport $portlist { 1707 set target $action1708 1709 1708 # If we have a url, use that, since it's most specific 1710 1709 # otherwise try to map the portname to a url … … 1723 1722 } 1724 1723 1724 set portdir [darwinports::getportdir $porturl $portdir] 1725 set portfile "${portdir}/PortFile" 1726 1727 if {[file readable $portfile]} { 1728 switch -- $action { 1729 cat { 1730 # Copy the portfile to standard output 1731 set f [open $portfile RDONLY] 1732 while { ![eof $f] } { 1733 puts [read $f 4096] 1734 } 1735 close $f 1736 } 1737 1738 ed { 1739 # Find an editor to edit the portfile 1740 set editor "" 1741 foreach ed { VISUAL EDITOR } { 1742 if {[info exists boot_env($ed)]} { 1743 set editor $boot_env($ed) 1744 } 1745 } 1746 1747 if { $editor == "" } { 1748 fatal "No EDITOR is specified in your environment" 1749 } else { 1750 eval exec $editor $portfile 1751 } 1752 } 1753 1754 path { 1755 # output the path to the port 1756 puts $portdir 1757 } 1758 1759 portfile { 1760 # output the path to the portfile 1761 puts $portfile 1762 } 1763 } 1764 } else { 1765 fatal_softcontinue "Could not read $portfile" 1766 } 1767 } 1768 } 1769 1770 sync { 1771 if {[catch {dportsync} result]} { 1772 global errorInfo 1773 ui_debug "$errorInfo" 1774 fatal "port sync failed: $result" 1775 } 1776 } 1777 1778 default { 1779 require_portlist 1780 foreachport $portlist { 1781 set target $action 1782 1783 # If we have a url, use that, since it's most specific 1784 # otherwise try to map the portname to a url 1785 if {$porturl == ""} { 1786 # Verify the portname, getting portinfo to map to a porturl 1787 if {[catch {set res [dportsearch $portname no exact]} result]} { 1788 global errorInfo 1789 ui_debug "$errorInfo" 1790 fatal_softcontinue "search for portname $portname failed: $result" 1791 } 1792 if {[llength $res] < 2} { 1793 fatal_softcontinue "Port $portname not found" 1794 } 1795 array set portinfo [lindex $res 1] 1796 set porturl $portinfo(porturl) 1797 } 1798 1725 1799 # If this is the install target, add any global_variations to the variations 1726 1800 # specified for the port
Note: See TracChangeset
for help on using the changeset viewer.