<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[122852] branches/gsoc14-cleanup/src</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/122852">122852</a></dd>
<dt>Author</dt> <dd>ksammons@macports.org</dd>
<dt>Date</dt> <dd>2014-07-31 14:02:25 -0700 (Thu, 31 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged from https://www.github.com/centip3de/GSoC.git</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesgsoc14cleanupsrcmacports10doctortcl">branches/gsoc14-cleanup/src/macports1.0/doctor.tcl</a></li>
<li><a href="#branchesgsoc14cleanupsrcmacports10macportstcl">branches/gsoc14-cleanup/src/macports1.0/macports.tcl</a></li>
<li><a href="#branchesgsoc14cleanupsrcportport">branches/gsoc14-cleanup/src/port/port</a></li>
<li><a href="#branchesgsoc14cleanupsrcportporttcl">branches/gsoc14-cleanup/src/port/port.tcl</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesgsoc14cleanupsrcmacports10doctortcl"></a>
<div class="modfile"><h4>Modified: branches/gsoc14-cleanup/src/macports1.0/doctor.tcl (122851 => 122852)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc14-cleanup/src/macports1.0/doctor.tcl        2014-07-31 20:45:18 UTC (rev 122851)
+++ branches/gsoc14-cleanup/src/macports1.0/doctor.tcl        2014-07-31 21:02:25 UTC (rev 122852)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx">
</span><span class="cx"> # Todo:
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> # Move port_doctor.ini to the port tree, below _resources
</span><span class="cx"> # Command-Line tools version check
</span><span class="cx"> # Support comments for the parser
</span><span class="lines">@@ -11,21 +12,83 @@
</span><span class="cx"> namespace eval doctor {
</span><span class="cx">
</span><span class="cx"> proc main {} {
</span><ins>+=======
+# Check the $DISPLAY
+
+# Done:
+# Add -q for quiet mode, where we don't print anything
+# Check for command line tools
+# Check for any DYLD_* environmental variables
+# Check for '.la' in dylib and '.prl'
+# Check if installed files are readable
+# Check for sqlite
+# Check for openssl
+# Crowd-source more ideas from the mailing-list
+# Check if $PATH is first
+# Check for issues with compilation. Compile small, simple file, check for "couldn't create cache file"
+# check_for_stray_developer_directory
+# Check for *.h, *.hpp, *.hxx in /usr/local/include
+# Check for *.dylib in /usr/local/lib
+# Check for other package managers. Fink = /sw, homebrew = /usr/local/Cellar
+# Check for all files installed by ports exists
+# Check for archives from all ports exists
+# Check for things in /usr/local
+# Check for x11.app if the OS is 10.6 and suggest installing xorg-server or the site on macosforge
+# Add error catching for line's without an equals sign.
+# Support comments for the parser
+# Check for amount of drive space
+# Move port_doctor.ini to the port tree, below _resources
+# Check for curl
+# Check for rsync
+# Check if macports is in /opt/local
+
+
+package provide doctor 1.0
+
+package require macports
+package require reclaim 1.0
+
+namespace eval doctor {
+
+ # Command line argument that determines whether or not to output things fancily.
+ variable quiet 0
+
+ proc main {opts} {
+
+>>>>>>> svn
</ins><span class="cx"> # The main function. Handles all the calls to the correct functions, and sets the config_options array,
</span><span class="cx"> # as well as the parser_options array.
</span><span class="cx"> #
</span><span class="cx"> # Args:
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> # None
</span><span class="cx"> # Returns:
</span><span class="cx"> # None
</span><span class="cx">
</span><ins>+=======
+ # opts - The options passed in. Currently the only option availible is 'quiet'.
+ # Returns:
+ # None
+
+ # Setting the 'quiet' variable based on what was passed in.
+ if {$opts ne ""} {
+ set doctor::quiet 1
+ } else {
+ set doctor::quiet 0
+ }
+
+>>>>>>> svn
</ins><span class="cx"> array set config_options [list]
</span><span class="cx"> set parser_options {"macports_location" "profile_path" "shell_location" "xcode_version_10.9" "xcode_version_10.8" \
</span><span class="cx"> "xcode_version_10.7" "xcode_version_10.6" "xcode_version_10.7" "xcode_version_10.6" "xcode_version_10.5" \
</span><span class="cx"> "xcode_version_10.4" "xcode_build"}
</span><span class="cx">
</span><span class="cx"> set user_config_path ${macports::portdbpath}/port_doctor.ini
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> set xcode_config_path ${macports::portdbpath}/xcode_versions.ini
</span><ins>+=======
+ set xcode_config_path ${macports::portdbpath}/sources/rsync.macports.org/release/tarballs/ports/_resources/xcode_versions.ini
+>>>>>>> svn
</ins><span class="cx">
</span><span class="cx"> # Make sure at least a default copy of the xcode and user config exist
</span><span class="cx"> make_xcode_config
</span><span class="lines">@@ -38,8 +101,434 @@
</span><span class="cx"> # Start the checks
</span><span class="cx"> check_path $config_options(macports_location) $config_options(profile_path) $config_options(shell_location)
</span><span class="cx"> check_xcode config_options
</span><ins>+<<<<<<< HEAD
+=======
+ check_for_app curl
+ check_for_app rsync
+ check_for_app openssl
+ check_for_app sqlite3
+ check_macports_location
+ check_free_space
+ check_for_x11
+ check_for_files_in_usr_local
+ check_tarballs
+ check_port_files
+ check_for_package_managers
+ check_for_stray_developer_directory
+ check_compilation_error_cache
+ check_for_dyld
+ check_for_clt
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+ proc check_for_clt {} {
+
+ # Checks to see if the Xcode Command Line Tools are installed by checking if the file
+ # /Library/Developer/CommandLineTools exists if the system is running 10.9, or if they're
+ # running an older version, if the command xcode-select -p outputs something.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "command line tools"
+
+ set version ${macports::macosx_version}
+
+ if {$version == 10.9} {
+
+ if {![file exists "/Library/Developer/CommandLineTools/"]} {
+
+ ui_warn "Xcode Command Line Tools are not installed! To install them, please enter the command:
+ xcode-select --install"
+ success_fail 0
+ return
+ }
+ success_fail 1
+ return
+
+ } else {
+
+ set xcode_select [exec xcode-select -p]
+
+ if {$xcode_select eq ""} {
+
+ ui_warn "Xcode Command Line Tools are not installed! To install them, please enter the command:
+ xcode-selct --install"
+ success_fail 0
+ return
+ }
+ success_fail 1
+ }
+ }
+
+ proc check_for_dyld {} {
+
+ # Checks to see if the current MacPorts session is running with a DYLD_* environmental
+ # variable set.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "DYLD_* environmental variables"
+
+ set printenv [exec printenv]
+ set split [split $printenv]
+
+ if {[regexp {DYLD_.} $split]} {
+ ui_warn "found a DYLD_* environmental variable. These are known to cause issues with MacPorts. Please\
+ unset the variable for the duration MacPorts is running."
+
+ success_fail 0
+ return
+ }
+
+ success_fail 1
+ }
+
+ proc output {string} {
+
+ # Outputs the given string formatted correctly.
+ #
+ # Args:
+ # string - The string to be output
+ # Returns:
+ # None
+
+ if {${doctor::quiet} eq 0} {
+ ui_msg -nonewline "Checking for $string... "
+ }
+ }
+
+ proc success_fail {result} {
+
+ # Either outputs a [SUCCESS] or [FAILED], depending on the result.
+ #
+ # Args:
+ # result - An integer value. 1 = [SUCCESS], anything else = [FAILED]
+ # Returns:
+ # None
+
+ if {${doctor::quiet} eq 0} {
+
+ if {$result == 1} {
+
+ ui_msg "\[SUCCESS\]"
+ return
+ }
+
+ ui_msg "\[FAILED\]"
+ }
+ }
+
+ proc check_compilation_error_cache {} {
+
+ # Checks to see if the compiler can compile properly, or it throws the error, "couldn't create cache file".
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "compilation errors"
+
+ set filename "test.c"
+ set fd [open $filename w]
+
+ puts $fd "int main() { return 0; }"
+ close $fd
+
+ set output [exec clang $filename -o main_test]
+
+ file delete $filename
+ file delete "main_test"
+
+ if {"couldn't create cache file" in $output} {
+ ui_warn "found errors when attempting to compile file. To fix this issue, delete your tmp folder using:
+ rm -rf \$TMPDIR"
+ success_fail 0
+ return
+ }
+
+ success_fail 1
+
+ }
+
+ proc check_for_stray_developer_directory {} {
+
+ # Checks to see if the script to remove leftover files from Xcode has been run or not. Implementation heavily influenced
+ # by Homebrew implementation.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "stray developer directory"
+
+ set uninstaller "/Developer/Library/uninstall-developer-folder"
+
+ if {${macports::xcodeversion} >= 4.3 && [file exists $uninstaller]} {
+ ui_warn "you have leftover files from an older version of Xcode. You should delete them by using, $uninstaller"
+
+ success_fail 0
+ return
+ }
+
+ success_fail 1
+ }
+
+ proc check_for_package_managers {} {
+
+ # Checks to see if either Fink or Homebrew are installed on the system. If they are, it warns them and suggest they uninstall
+ # or move them to a different location.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "HomeBrew"
+
+ if {[file exists "/usr/local/Cellar"]} {
+ ui_warn "it seems you have Homebrew installed on this system -- Because Homebrew uses /usr/local, this can potentially cause issues \
+ with MacPorts. We'd recommend you either uninstall it, or move it from /usr/local for now."
+
+ success_fail 0
+
+ } else {
+
+ success_fail 1
+ }
+
+ output "Fink"
+ if {[file exists "/sf"]} {
+ ui_warn "it seems you have Fink installed on your system -- This could potentially cause issues with MacPorts. We'd recommend you'd \
+ either uninstall it, or move it from /sf for now."
+
+ success_fail 0
+
+ } else {
+
+ success_fail 1
+ }
+ }
+
+ proc check_port_files {} {
+
+ # Checks to see if each file installed by all active and installed ports actually exists on the filesystem. If not, it warns
+ # the user and suggests the user deactivate and reactivate the port.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+
+ set apps [reclaim::get_info]
+
+ foreach app $apps {
+
+
+ set name [lindex $app 0]
+ set active [lindex $app 4]
+ set files [registry::port_registered $name]
+
+ if {$active} {
+
+ foreach file $files {
+
+ output "file '$file' on disk"
+
+ if {![file exists $file]} {
+ success_fail 0
+ ui_warn "couldn't find file '$file' for port '$name'. Please deactivate and reactivate the port to fix this issue."
+
+ } elseif {![file readable $file]} {
+ success_fail 0
+ ui_warn "'$file' installed by port '$name' is currently not readable. Please try again. If this problem persists, please contact\
+ the mailing list."
+
+ } else {
+
+ success_fail 1
+ }
+ }
+ }
+ }
+
+ }
+
+ proc check_tarballs {} {
+
+ # Checks if the archives for each installed port in /opt/local/var/macports/software/$name is actually in there. If not, it warns
+ # the user and suggest a reinstallation of the port.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ set apps [reclaim::get_info]
+
+ foreach app $apps {
+
+ output "'$app's tarball on disk"
+
+ set name [lindex $app 0]
+ set version [lindex $app 1]
+ set revision [lindex $app 2]
+ set variants [lindex $app 3]
+ set epoch [lindex $app 5]
+
+ set ref [registry::open_entry $name $version $revision $variants $epoch]
+ set image_dir [registry::property_retrieve $ref location]
+
+ if {![file exists $image_dir]} {
+ ui_warn "couldn't find the archive for '$name'. Please uninstall and reinstall this application."
+ success_fail 0
+ } else {
+ success_fail 1
+ }
+ }
+ }
+
+ proc check_for_files_in_usr_local {} {
+
+ # Checks for dylibs in /usr/local/lib and header files in /usr/local/include, and warns the user about said files if they
+ # are found.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "dylibs in /usr/local/lib"
+
+ if {[glob -nocomplain -directory "/usr/local/lib" *.dylib *.la *.prl] ne ""} {
+ ui_warn "found dylib's in your /usr/local/lib directory. These are known to cause problems. We'd recommend \
+ you remove them."
+
+ success_fail 0
+
+ } else {
+
+ success_fail 1
+ }
+
+ output "header files in /usr/local/include"
+
+ if {[glob -nocomplain -directory "/usr/local/include" *.h *.hpp *.hxx] ne ""} {
+ ui_warn "found header files in your /usr/local/include directory. These are known to cause problems. We'd recommend \
+ you remove them."
+
+ success_fail 0
+
+ } else {
+
+ success_fail 1
+ }
+ }
+
+ proc check_for_x11 {} {
+
+ # Checks to see if the user is using the X11.app, and if they're on 10.6. If they are, it alerts them about it.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "X11.app on OS X 10.6 systems"
+
+ set mac_version ${macports::macosx_version}
+
+ if {$mac_version == 10.6} {
+
+ if {[file exists /Applications/X11.app]} {
+ ui_error "it seems you have Mac OSX 10.6 installed, and are using X11 from \"X11.app\". This has been known to cause issues. \
+ To fix this, please install xorg-server, by using the command 'sudo port install xorg-server', or installing it from \
+ their website, http://xquartz.macosforge.org/trac/wiki/Releases."
+
+ success_fail 0
+ return
+ }
+ }
+
+ success_fail 1
+ }
+
+ proc check_free_space {} {
+
+ # Checks to see if the user has less than 5 gigs of space left, and warns if they don't.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "free disk space"
+
+ set output [exec df -g]
+ set tokens [split $output \n]
+ set disk_info [lindex $tokens 1]
+ set availible [lindex $disk_info 3]
+
+ if {$availible < 5} {
+ ui_warn "you have less than 5 gigabytes free on your machine! This can cause serious errors. We recommend trying to clear out unnecessary \
+ programs and files by running 'sudo port reclaim', or manually uninstalling/deleting programs and folders on your drive."
+
+ success_fail 0
+ return
+ }
+
+ success_fail 1
+ }
+
+ proc check_macports_location {} {
+
+ # Checks to see if port is where it should be. If it isn't, freak the frick out.
+ #
+ # Args:
+ # None
+ # Returns:
+ # None
+
+ output "MacPort's location"
+
+ if {[file exists ${macports::prefix}/bin/port] == 0} {
+ ui_error "port was not in ${macports::prefix}/bin. This can potentially cause errors. It's recommended you move it back to ${macports::prefix}/bin."
+ success_fail 0
+ return
+ }
+
+ success_fail 1
+ }
+
+ proc check_for_app {app} {
+
+ # Check's if the binary supplied exists in /usr/bin. If it doesn't, it warns the user.
+ #
+ # Args:
+ # app - The name of the app to check for.
+ # Returns
+ # None
+
+ output "for '$app'"
+
+ if {[file exists /usr/bin/$app] == 0} {
+ ui_error "$app is needed by MacPorts to function normally, but wasn't found on this system. We'd recommend \
+ installing it for continued use of MacPorts."
+ success_fail 0
+ return
+ }
+
+ success_fail 1
+>>>>>>> svn
+ }
+
</ins><span class="cx"> proc check_xcode {config_options} {
</span><span class="cx">
</span><span class="cx"> # Checks to see if the currently installed version of Xcode works with the curent OS version.
</span><span class="lines">@@ -49,6 +538,11 @@
</span><span class="cx"> # Returns:
</span><span class="cx"> # None
</span><span class="cx">
</span><ins>+<<<<<<< HEAD
+=======
+ output "correct Xcode version"
+
+>>>>>>> svn
</ins><span class="cx"> upvar $config_options config
</span><span class="cx">
</span><span class="cx"> set mac_version ${macports::macosx_version}
</span><span class="lines">@@ -56,12 +550,20 @@
</span><span class="cx"> set xcode_versions $config(xcode_version_$mac_version)
</span><span class="cx">
</span><span class="cx"> if {$xcode_current in $xcode_versions} {
</span><ins>+<<<<<<< HEAD
+=======
+ success_fail 1
+>>>>>>> svn
</ins><span class="cx"> return
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="cx"> ui_error "currently installed version of Xcode, $xcode_current, is not supported by MacPorts. \
</span><span class="cx"> For your currently installed system, only the following versions of Xcode are supported: \
</span><span class="cx"> $xcode_versions"
</span><ins>+<<<<<<< HEAD
+=======
+ success_fail 0
+>>>>>>> svn
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -74,8 +576,14 @@
</span><span class="cx"> # Returns:
</span><span class="cx"> # None
</span><span class="cx">
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> set path ${macports::portdbpath}/xcode_versions.ini
</span><ins>+=======
+ #FIXME: This most likely shouldn't be hardcoded... but for now it is. Fix it.
</ins><span class="cx">
</span><ins>+ set path ${macports::portdbpath}/sources/rsync.macports.org/release/tarballs/ports/_resources/xcode_versions.ini
+>>>>>>> svn
+
</ins><span class="cx"> if {[file exists $path] == 0} {
</span><span class="cx"> ui_warn "No configuration file found at $path. Creating generic config file."
</span><span class="cx">
</span><span class="lines">@@ -109,7 +617,11 @@
</span><span class="cx"> ui_warn "No configuration file found at $path. Creating generic config file."
</span><span class="cx">
</span><span class="cx"> set fd [open $path w]
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> puts $fd "macports_location=/opt/local"
</span><ins>+=======
+ puts $fd "macports_location=${macports::prefix}"
+>>>>>>> svn
</ins><span class="cx"> puts $fd "profile_path=${macports::user_home}/.bash_profile"
</span><span class="cx"> puts $fd "shell_location=/bin/bash"
</span><span class="cx">
</span><span class="lines">@@ -119,8 +631,13 @@
</span><span class="cx">
</span><span class="cx"> proc get_config {config_options parser_options path} {
</span><span class="cx">
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> # Reads in and parses the configureation file, port_doctor.ini. After parsing, all variables found are assigned
</span><span class="cx"> # in the 'config_options' associative array.
</span><ins>+=======
+ # Reads in and parses the configuration file passed in to $path. After parsing, all variables found are assigned
+ # in the 'config_options' associative array.
+>>>>>>> svn
</ins><span class="cx"> #
</span><span class="cx"> # Args:
</span><span class="cx"> # config_options - The associative array responsible for holding all the configuration options.
</span><span class="lines">@@ -138,11 +655,28 @@
</span><span class="cx"> close $fd
</span><span class="cx">
</span><span class="cx"> foreach line $data {
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> set tokens [split $line "="]
</span><span class="cx">
</span><span class="cx"> if {[lindex $tokens 0] in $parser_options} {
</span><span class="cx"> set config([lindex $tokens 0]) [lindex $tokens 1]
</span><span class="cx">
</span><ins>+=======
+
+ # Ignore comments
+ if {[string index $line 0] eq "#" } {
+ continue
+ }
+
+ #The tokens
+ set tokens [split $line "="]
+
+ # Only care about things that are in $parser_options
+ if {[lindex $tokens 0] in $parser_options} {
+ set config([lindex $tokens 0]) [lindex $tokens 1]
+
+ # Ignore whitespace
+>>>>>>> svn
</ins><span class="cx"> } elseif {[lindex $tokens 0] eq ""} {
</span><span class="cx"> continue
</span><span class="cx">
</span><span class="lines">@@ -168,6 +702,14 @@
</span><span class="cx"> set split [split $path :]
</span><span class="cx">
</span><span class="cx"> if {"$port_loc/bin" in $split && "$port_loc/sbin" in $split } {
</span><ins>+<<<<<<< HEAD
+=======
+
+ if {[lindex $split 0] != "$port_loc/bin"} {
+ ui_warn "$port_loc/bin is not first in your PATH environmental variable. This may or may not \
+ cause problems in the future."
+ }
+>>>>>>> svn
</ins><span class="cx"> return
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="lines">@@ -188,11 +730,16 @@
</span><span class="cx"> puts $fd "export PATH=$port_loc/bin:$port_loc/sbin:\$PATH"
</span><span class="cx"> close $fd
</span><span class="cx">
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> ui_msg "Reloading $profile_path..."
</span><span class="cx"> exec $shell_loc $profile_path
</span><span class="cx">
</span><span class="cx"> ui_msg "Port should now be successfully set up."
</span><span class="cx">
</span><ins>+=======
+ ui_msg "Added PATH properly. Please execute, 'source $profile_path' in a new terminal window."
+
+>>>>>>> svn
</ins><span class="cx"> } elseif {$input == "n" || $input == "N"} {
</span><span class="cx"> ui_msg "Not fixing your \$PATH variable."
</span><span class="cx">
</span></span></pre></div>
<a id="branchesgsoc14cleanupsrcmacports10macportstcl"></a>
<div class="modfile"><h4>Modified: branches/gsoc14-cleanup/src/macports1.0/macports.tcl (122851 => 122852)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc14-cleanup/src/macports1.0/macports.tcl        2014-07-31 20:45:18 UTC (rev 122851)
+++ branches/gsoc14-cleanup/src/macports1.0/macports.tcl        2014-07-31 21:02:25 UTC (rev 122852)
</span><span class="lines">@@ -4371,7 +4371,11 @@
</span><span class="cx"> return yes
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> proc macports::doctor_main {} {
</span><ins>+=======
+proc macports::doctor_main {opts} {
+>>>>>>> svn
</ins><span class="cx">
</span><span class="cx"> # Calls the main function for the 'port doctor' command.
</span><span class="cx"> #
</span><span class="lines">@@ -4380,7 +4384,11 @@
</span><span class="cx"> # Returns:
</span><span class="cx"> # 0 on successful execution.
</span><span class="cx">
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> doctor::main
</span><ins>+=======
+ doctor::main $opts
+>>>>>>> svn
</ins><span class="cx"> return 0
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchesgsoc14cleanupsrcportport"></a>
<div class="modfile"><h4>Modified: branches/gsoc14-cleanup/src/port/port (122851 => 122852)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc14-cleanup/src/port/port        2014-07-31 20:45:18 UTC (rev 122851)
+++ branches/gsoc14-cleanup/src/port/port        2014-07-31 21:02:25 UTC (rev 122852)
</span><span class="lines">@@ -2732,11 +2732,24 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc action_doctor { action portlist opts } {
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> macports::doctor_main
</span><ins>+=======
+ if {[prefix_unwritable]} {
+ return 1
+ }
+ macports::doctor_main $opts
+>>>>>>> svn
</ins><span class="cx"> return 0
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc action_reclaim { action portlist opts } {
</span><ins>+<<<<<<< HEAD
+=======
+ if {[prefix_unwritable]} {
+ return 1
+ }
+>>>>>>> svn
</ins><span class="cx"> macports::reclaim_main
</span><span class="cx"> return 0
</span><span class="cx"> }
</span><span class="lines">@@ -4350,6 +4363,7 @@
</span><span class="cx"> log {{phase 1} {level 1}}
</span><span class="cx"> upgrade {force enforce-variants no-replace no-rev-upgrade}
</span><span class="cx"> rev-upgrade {id-loadcmd-check}
</span><ins>+ doctor {quiet}
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ##
</span></span></pre></div>
<a id="branchesgsoc14cleanupsrcportporttcl"></a>
<div class="modfile"><h4>Modified: branches/gsoc14-cleanup/src/port/port.tcl (122851 => 122852)</h4>
<pre class="diff"><span>
<span class="info">--- branches/gsoc14-cleanup/src/port/port.tcl        2014-07-31 20:45:18 UTC (rev 122851)
+++ branches/gsoc14-cleanup/src/port/port.tcl        2014-07-31 21:02:25 UTC (rev 122852)
</span><span class="lines">@@ -1,4 +1,3 @@
</span><del>-#!@TCLSH@
</del><span class="cx"> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
</span><span class="cx"> # $Id: port.tcl 119177 2014-04-18 22:35:29Z cal@macports.org $
</span><span class="cx"> #
</span><span class="lines">@@ -2732,11 +2731,24 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc action_doctor { action portlist opts } {
</span><ins>+<<<<<<< HEAD
</ins><span class="cx"> macports::doctor_main
</span><ins>+=======
+ if {[prefix_unwritable]} {
+ return 1
+ }
+ macports::doctor_main $opts
+>>>>>>> svn
</ins><span class="cx"> return 0
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> proc action_reclaim { action portlist opts } {
</span><ins>+<<<<<<< HEAD
+=======
+ if {[prefix_unwritable]} {
+ return 1
+ }
+>>>>>>> svn
</ins><span class="cx"> macports::reclaim_main
</span><span class="cx"> return 0
</span><span class="cx"> }
</span><span class="lines">@@ -4350,6 +4362,7 @@
</span><span class="cx"> log {{phase 1} {level 1}}
</span><span class="cx"> upgrade {force enforce-variants no-replace no-rev-upgrade}
</span><span class="cx"> rev-upgrade {id-loadcmd-check}
</span><ins>+ doctor {quiet}
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ##
</span></span></pre>
</div>
</div>
</body>
</html>