[138995] branches/gsoc15-dependency/base/src/macports1.0

ijackson at macports.org ijackson at macports.org
Sun Jul 26 13:38:32 PDT 2015


Revision: 138995
          https://trac.macports.org/changeset/138995
Author:   ijackson at macports.org
Date:     2015-07-26 13:38:32 -0700 (Sun, 26 Jul 2015)
Log Message:
-----------
WIP: Install ports after libsolv dependency calculation.
Add porturl to the $installed_list for mportopen.
Fix the order of _mportexec arguments.
Use getsourcepath to set the $source in $pool add_repo.

Modified Paths:
--------------
    branches/gsoc15-dependency/base/src/macports1.0/macports.tcl
    branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl

Modified: branches/gsoc15-dependency/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc15-dependency/base/src/macports1.0/macports.tcl	2015-07-26 19:16:26 UTC (rev 138994)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports.tcl	2015-07-26 20:38:32 UTC (rev 138995)
@@ -2028,9 +2028,9 @@
             set porturl [lindex $port 1]
             ui_debug "Installing $portname"
             set options(subport) $portname
-            puts "mportopen $porturl [list subport $portname]"
+            ui_debug "mportopen $porturl [list subport $portname]"
             set mport [mportopen $porturl [list subport $portname]]
-            set result [_mportexec $mport activate]
+            set result [_mportexec activate $mport]
         }
         return $result
     }

Modified: branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl
===================================================================
--- branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl	2015-07-26 19:16:26 UTC (rev 138994)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl	2015-07-26 20:38:32 UTC (rev 138995)
@@ -109,7 +109,7 @@
             foreach source $sources {
                 set source [lindex $source 0]
                 ## Add a repo in the pool for each source as mentioned in sources.conf
-                set repo [$pool add_repo $source]
+                set repo [$pool add_repo [macports::getsourcepath $source]]
                 set repodata [$repo add_repodata]
  
                 if {[catch {set fd [open [macports::getindex $source] r]} result]} {
@@ -285,6 +285,7 @@
     ## Dependency calculation using libsolv
     proc dep_calc {portlist} {
         set pool [create_pool]
+        variable portindexinfo
         # $pool set_debuglevel 3
         
         ## List of ports to be installed
@@ -404,8 +405,10 @@
                         puts "[$p __str__] -> [$op __str__]"
                 } else {
                     puts [$p __str__]
-                    set purl [$p lookup_str $solv::SOLVABLE_URL]
-                    lappend install_list [list [$p cget -name] $purl] 
+                    array set portinfo $portindexinfo([$p cget -id])
+                    set porturl "file://[[$p cget -repo] cget -name]/${portinfo(portdir)}"
+                    lappend install_list [list [$p cget -name] $porturl] 
+                    array unset -nocomplain portinfo
                 }
             }
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150726/d838e4c0/attachment.html>


More information about the macports-changes mailing list