@@ -348,7 +348,7 @@ let apply_selector ~base st = function
348
348
base
349
349
| Tag t ->
350
350
OpamPackage.Set. filter (fun nv ->
351
- get_opam st nv |> List. mem t @* OpamFile.OPAM. tags)
351
+ get_opam st nv |> List. exists ( String. equal t) @* OpamFile.OPAM. tags)
352
352
base
353
353
| From_repository repos ->
354
354
let rt = st.switch_repos in
@@ -358,7 +358,8 @@ let apply_selector ~base st = function
358
358
let packages =
359
359
OpamPackage. keys (OpamRepositoryName.Map. find r rt.repo_opams)
360
360
in
361
- if List. mem r repos then OpamPackage.Set. union packages (aux rl)
361
+ if List. exists (OpamRepositoryName. equal r) repos
362
+ then OpamPackage.Set. union packages (aux rl)
362
363
else OpamPackage.Set. diff (aux rl) packages
363
364
in
364
365
aux (OpamSwitchState. repos_list st)
@@ -383,12 +384,13 @@ let apply_selector ~base st = function
383
384
OpamStd.String.Map. exists
384
385
(fun f -> function
385
386
| OpamDirTrack. Removed -> false
386
- | _ -> rel_name = f )
387
+ | _ -> rel_name = (f : string ) )
387
388
changes)
388
389
(OpamFilename. files (OpamPath.Switch. install_dir root switch))
389
390
in
390
391
let selections =
391
- if switch = st.switch then OpamSwitchState. selections st
392
+ if OpamSwitch. equal switch st.switch then
393
+ OpamSwitchState. selections st
392
394
else
393
395
OpamSwitchState. load_selections ~lock_kind: `Lock_none
394
396
st.switch_global switch
@@ -504,7 +506,7 @@ let field_of_string ~raw =
504
506
try
505
507
OpamStd.List. assoc String. equal s names_fields
506
508
with Not_found ->
507
- match OpamStd.List. find_opt (fun x -> s = x ) opam_fields with
509
+ match OpamStd.List. find_opt (fun x -> s = (x : string ) ) opam_fields with
508
510
| Some f -> Field f
509
511
| None -> OpamConsole. error_and_exit `Bad_arguments " No printer for %S" s
510
512
@@ -569,7 +571,10 @@ let detail_printer ?prettify ?normalise ?(sort=false) st nv =
569
571
(match OpamPinned. package_opt st nv.name with
570
572
| Some nv ->
571
573
let opam = get_opam st nv in
572
- if Some opam = OpamPackage.Map. find_opt nv st.repos_package_index then
574
+ if
575
+ OpamStd.Option. equal OpamFile.OPAM. equal
576
+ (Some opam) (OpamPackage.Map. find_opt nv st.repos_package_index)
577
+ then
573
578
Printf. sprintf " pinned to version %s"
574
579
(OpamPackage.Version. to_string nv.version % [`blue ])
575
580
else
0 commit comments