anchor.diff:              {value, {PkgName, Constraints0}} ->
                   Constraints0
           end,
  -    [{PkgName, [PkgConstraint | Constraints1]} |
  +    [{PkgName, [{PkgConstraint, {SrcPkg, SrcVsn}} | Constraints1]} |
        lists:keydelete(PkgName, 1, PkgsConstraints)].
   
   %% @doc
   %% Extend the currently active constraints correctly for the given constraints.
  --spec extend_constraints(constraints(),constraints()) -> [{pkg_name(), constraints()}].
  -extend_constraints(ExistingConstraints0, NewConstraints) ->
  +-spec extend_constraints(pkg_name(), vsn(), constraints(),constraints()) -> [{pkg_name(), constraints()}].
  +extend_constraints(SrcPkg, SrcVsn, ExistingConstraints0, NewConstraints) ->
       lists:foldl(fun (Constraint, ExistingConstraints1) ->
  -                        add_constraint(ExistingConstraints1, Constraint)
  +                        add_constraint(SrcPkg, SrcVsn, ExistingConstraints1, Constraint)
                   end,
  -                ExistingConstraints0, NewConstraints).
  +                ExistingConstraints0, [{SrcPkg, SrcVsn} | NewConstraints]).
   
   -spec normalize_version(vsn()) -> vsn().
   normalize_version({M}) ->
  
positive.code: %% pkgs) that serve to walk the solution space of dependency.
  -spec all_pkgs(dep_graph(),[pkg_name()],[pkg_name()],[{pkg_name(), constraints()}]) ->
                        fail | [pkg()].
  all_pkgs(_State, _, [], Constraints) ->
      PkgVsns =
          [filter_package_constraints(PkgConstraints)
           || {_, PkgConstraints} <- Constraints],
  
negative.code: pkgs(DepGraph, Visited, Pkg, Constraints, OtherPkgs) ->
      F = fun (Vsn) ->
                  Deps = get_dep_constraints(DepGraph, Pkg, Vsn),
                  UConstraints = extend_constraints(Pkg, Vsn, Constraints, Deps),
                  DepPkgs =[dep_pkg(Dep) || Dep <- Deps],
                  NewVisited = [Pkg | Visited],
                  Res = all_pkgs(DepGraph, NewVisited, DepPkgs ++ OtherPkgs, UConstraints),
                  Res
  
          end,
      case constrained_package_versions(DepGraph, Pkg, Constraints) of
          [] ->
              fail;
          Res ->
              lists_some(F, Res)
      end.
  
  
  %% @doc This gathers the dependency constraints for a given package vsn from the
  