summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2021-10-27 16:43:28 +0200
committerMichal Domonkos <mdomonko@redhat.com>2022-07-01 10:52:14 +0200
commit6602a3d78cab634f355fcf3f663e72bfb6ec7010 (patch)
treede1bbea56284192ebd79d71796479f09e605ba64
parent52a829324e0d04bfae961ea1d67d85bac6f13a52 (diff)
downloadrpm-6602a3d78cab634f355fcf3f663e72bfb6ec7010.tar.gz
Update OCaml requires/provides to ignore cmxs
OCaml cmxs files are static libraries, which can be loaded at runtime via the Dynlink module. They apparently do not provide any useful runtime dependency information to be stored into the packages Provides/Requires list. Therefore just skip them. Adjust attr, remove extension and ELF magic Adjust ocamldeps, do nothing with cmxs files. Fixes: a6fe37c39b39acbcbd014dd1e6d5653ff84254a1 Signed-off-by: Olaf Hering <olaf@aepfle.de> (cherry picked from commit 89d5bf13cec6a37c7098f6b559a18f8c39e55576)
-rw-r--r--fileattrs/ocaml.attr4
-rw-r--r--scripts/ocamldeps.sh6
2 files changed, 7 insertions, 3 deletions
diff --git a/fileattrs/ocaml.attr b/fileattrs/ocaml.attr
index 4bd65c17a..20f052963 100644
--- a/fileattrs/ocaml.attr
+++ b/fileattrs/ocaml.attr
@@ -1,5 +1,5 @@
%__ocaml_provides %{_rpmconfigdir}/ocamldeps.sh --provides
%__ocaml_requires %{_rpmconfigdir}/ocamldeps.sh --requires
-%__ocaml_magic ^(ELF|Objective caml|OCaml) .*$
-%__ocaml_path .(cma|cmi|cmo|cmx|cmxa|cmxs)$
+%__ocaml_magic ^(Objective caml|OCaml) .*$
+%__ocaml_path .(cma|cmi|cmo|cmx|cmxa)$
%__ocaml_flags magic_and_path
diff --git a/scripts/ocamldeps.sh b/scripts/ocamldeps.sh
index aee72e3d4..df2ddfbaf 100644
--- a/scripts/ocamldeps.sh
+++ b/scripts/ocamldeps.sh
@@ -32,6 +32,10 @@
# Implementations imported:
# HASH NAME_FROM_OTHER_MODULE
#
+# cmxs files are recoqnized, but need to be ignored.
+# They contain references of the interfaces and implementations
+# compiled into them.
+#
# The hash may contain just '-', in which case it is ignored.
#
# Output:
@@ -236,7 +240,7 @@ do
*.cmo) parse "${filename}" ;;
*.cmx) parse "${filename}" ;;
*.cmxa) parse "${filename}" ;;
- *.cmxs) parse "${filename}" ;;
+ *.cmxs) ;;
*) continue ;;
esac
done