Index: src/macports1.0/macports.tcl
===================================================================
--- src/macports1.0/macports.tcl	(revision 39307)
+++ src/macports1.0/macports.tcl	(working copy)
@@ -369,14 +369,14 @@
     
     # Configure the search path for configuration files
     set conf_files ""
+    lappend conf_files "${macports_conf_path}/macports.conf"
+    if { [file isdirectory $macports_user_dir] } {
+        lappend conf_files "${macports_user_dir}/macports.conf"
+    }
     if {[info exists env(PORTSRC)]} {
         set PORTSRC $env(PORTSRC)
         lappend conf_files ${PORTSRC}
     }
-    if { [file isdirectory $macports_user_dir] } {
-        lappend conf_files "${macports_user_dir}/macports.conf"
-    }
-    lappend conf_files "${macports_conf_path}/macports.conf"
     
     # Process the first configuration file we find on conf_files list
     foreach file $conf_files {
@@ -391,7 +391,6 @@
                     }
                 }
             }            
-            break
         }
     }
     
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39307)
+++ ChangeLog	(working copy)
@@ -5,6 +5,11 @@
 
 
 Unreleased:
+	- Changes in loading of configuration files. Currently the global
+	  configuration file is loaded first, then user defined one (if present),
+	  PORTSRC environment variable is loaded last. Last defined value is used
+	  for each configuration option. (#16329, contributed by Adam Byrtek)
+
     - Ruby port group now accepts a new (optional) last parameter for the
       ruby.setup command, "implementation". It is "ruby" by default, and 
       can be set to "ruby19". It names the ruby-implementing port, and can

