[138030] branches/gsoc15-dependency/base/src/macports1.0
ijackson at macports.org
ijackson at macports.org
Fri Jun 26 03:06:28 PDT 2015
Revision: 138030
https://trac.macports.org/changeset/138030
Author: ijackson at macports.org
Date: 2015-06-26 03:06:28 -0700 (Fri, 26 Jun 2015)
Log Message:
-----------
Add Conflicts and Obsoletes information to solv
WIP: Create a dep_calc proc which will handle the
dependency calculation using libsolv. Add call
to libsolv::dep_calc in mportexec when
[macports::_target_needs_deps $target] is true.
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-06-26 09:03:36 UTC (rev 138029)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports.tcl 2015-06-26 10:06:28 UTC (rev 138030)
@@ -2047,6 +2047,11 @@
}
}
+ if {[macports::_target_needs_deps $target]} {
+ macports::libsolv::create_pool
+ set dep_res [macports::libsolv::dep_calc $portname]
+ }
+
# Before we build the port, we must build its dependencies.
set dlist {}
if {[macports::_target_needs_deps $target] && [macports::_mport_has_deptypes $mport [macports::_deptypes_for_target $target $workername]]} {
Modified: branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl
===================================================================
--- branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl 2015-06-26 09:03:36 UTC (rev 138029)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl 2015-06-26 10:06:28 UTC (rev 138030)
@@ -160,6 +160,22 @@
[$pool str2id $dep_name 1] -1
}
}
+ ## Add Conflicts to the solvables
+ if {[info exists portinfo(conflicts)]} {
+ foreach conf $portinfo(conflicts) {
+ puts "Conflicts: $conf"
+ $solvable add_deparray $solv::SOLVABLE_CONFLICTS \
+ [$pool str2id $conf 1]
+ }
+ }
+ ## Add Obsoletes(replaced_by) to the solvables
+ if {[info exists portinfo(replaced_by)]} {
+ foreach conf $portinfo(replaced_by) {
+ puts "Conflicts: $conf"
+ $solvable add_deparray $solv::SOLVABLE_OBSOLETES \
+ [$pool str2id $conf 1]
+ }
+ }
## Set portinfo of each solv object. Map it to correct solvid.
set portindexinfo([$solvable cget -id]) $line
@@ -267,4 +283,10 @@
return $matches
}
+
+ ## Dependency calculation using libsolv
+ proc dep_calc {portname} {
+ ui_msg -nonewline "$macports::ui_prefix Computing dependencies for $portname using libsolv"
+
+ }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150626/ace72edb/attachment.html>
More information about the macports-changes
mailing list