@@ -679,6 +679,7 @@ impl DependencyProvider for SpkProvider {
679
679
let compatible = pkg_request
680
680
. is_version_applicable ( located_build_ident_with_component. ident . version ( ) ) ;
681
681
if compatible. is_ok ( ) {
682
+ tracing:: trace!( pkg_request = %pkg_request. pkg, version = %located_build_ident_with_component. ident. version( ) , "version applicable" ) ;
682
683
let is_source =
683
684
located_build_ident_with_component. ident . build ( ) . is_source ( ) ;
684
685
@@ -710,52 +711,57 @@ impl DependencyProvider for SpkProvider {
710
711
// Only select All component for requests of All
711
712
// component.
712
713
if located_build_ident_with_component. component . is_all ( ) {
713
- if pkg_request. pkg . components . contains ( & Component :: All ) ^ inverse {
714
- selected. push ( * candidate) ;
715
- }
716
- continue ;
717
- } else
718
- // Only the All component can satisfy requests for All.
719
- if pkg_request. pkg . components . contains ( & Component :: All ) {
720
- if inverse {
721
- selected. push ( * candidate) ;
722
- }
723
- continue ;
724
- }
725
-
726
- // Only the x component can satisfy requests for x.
727
- let mut at_least_one_request_matched_this_solvable = None ;
728
- for component in pkg_request. pkg . components . iter ( ) {
729
- if component. is_all ( ) {
730
- continue ;
731
- }
732
- if component == & located_build_ident_with_component. component {
733
- at_least_one_request_matched_this_solvable = Some ( true ) ;
734
- break ;
735
- } else {
736
- at_least_one_request_matched_this_solvable = Some ( false ) ;
737
- }
738
- }
739
-
740
- match at_least_one_request_matched_this_solvable {
741
- Some ( true ) => {
714
+ // This can disqualify but not qualify; version
715
+ // compatibility check is still required.
716
+ if !pkg_request. pkg . components . contains ( & Component :: All ) {
742
717
if inverse {
743
- continue ;
718
+ selected . push ( * candidate ) ;
744
719
}
720
+ continue ;
745
721
}
746
- Some ( false ) => {
747
- // The request is for specific components but
748
- // this solvable doesn't match any of them.
722
+ } else {
723
+ // Only the All component can satisfy requests for All.
724
+ if pkg_request . pkg . components . contains ( & Component :: All ) {
749
725
if inverse {
750
726
selected. push ( * candidate) ;
727
+ }
728
+ continue ;
729
+ }
730
+
731
+ // Only the x component can satisfy requests for x.
732
+ let mut at_least_one_request_matched_this_solvable = None ;
733
+ for component in pkg_request. pkg . components . iter ( ) {
734
+ if component. is_all ( ) {
751
735
continue ;
752
736
}
737
+ if component == & located_build_ident_with_component. component {
738
+ at_least_one_request_matched_this_solvable = Some ( true ) ;
739
+ break ;
740
+ } else {
741
+ at_least_one_request_matched_this_solvable = Some ( false ) ;
742
+ }
753
743
}
754
- None => {
755
- // TODO: if at_least_one_request_matched_this_solvable
756
- // is None it means the request didn't specify a
757
- // component. Decide which specific component this
758
- // should match.
744
+
745
+ match at_least_one_request_matched_this_solvable {
746
+ Some ( true ) => {
747
+ if inverse {
748
+ continue ;
749
+ }
750
+ }
751
+ Some ( false ) => {
752
+ // The request is for specific components but
753
+ // this solvable doesn't match any of them.
754
+ if inverse {
755
+ selected. push ( * candidate) ;
756
+ continue ;
757
+ }
758
+ }
759
+ None => {
760
+ // TODO: if at_least_one_request_matched_this_solvable
761
+ // is None it means the request didn't specify a
762
+ // component. Decide which specific component this
763
+ // should match.
764
+ }
759
765
}
760
766
}
761
767
@@ -772,6 +778,7 @@ impl DependencyProvider for SpkProvider {
772
778
. await
773
779
{
774
780
if pkg_request. is_satisfied_by ( & package) . is_ok ( ) ^ inverse {
781
+ tracing:: trace!( pkg_request = %pkg_request. pkg, package = %package. ident( ) , %inverse, "satisfied by" ) ;
775
782
selected. push ( * candidate) ;
776
783
}
777
784
} else if inverse {
0 commit comments