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

ijackson at macports.org ijackson at macports.org
Sat Jul 25 10:16:11 PDT 2015


Revision: 138972
          https://trac.macports.org/changeset/138972
Author:   ijackson at macports.org
Date:     2015-07-25 10:16:11 -0700 (Sat, 25 Jul 2015)
Log Message:
-----------
WIP: Install packages returned by libsolv.
Porturl needs to be set properly. Currently
it points to the package's homepage rather than the
package tarball.

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-25 14:36:38 UTC (rev 138971)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports.tcl	2015-07-25 17:16:11 UTC (rev 138972)
@@ -2022,6 +2022,17 @@
 proc mportinstall {portlist target} {
     if {[macports::_target_needs_deps $target]} {
         set dep_res [macports::libsolv::dep_calc $portlist]
+        ## Install each port. First use mportopen and then _mportexec.
+        foreach port $dep_res {
+            set portname [lindex $port 0]
+            set porturl [lindex $port 1]
+            ui_debug "Installing $portname"
+            set options(subport) $portname
+            puts "mportopen $porturl [list subport $portname]"
+            set mport [mportopen $porturl [list subport $portname]]
+            set result [_mportexec $mport activate]
+        }
+        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-25 14:36:38 UTC (rev 138971)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl	2015-07-25 17:16:11 UTC (rev 138972)
@@ -401,7 +401,8 @@
                         puts "[$p __str__] -> [$op __str__]"
                 } else {
                     puts [$p __str__]
-                    lappend install_list [$p cget -name]
+                    set purl [$p lookup_str $solv::SOLVABLE_URL]
+                    lappend install_list [list [$p cget -name] $purl] 
                 }
             }
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150725/45a8cdb0/attachment.html>


More information about the macports-changes mailing list