Displaying 7 results from an estimated 7 matches for "rpm_package_of_string".
2015 Oct 13
1
[PATCH v2] rpm: Choose providers better (RHBZ#1266918).
This is v2 of the 4/4 patch from the original series.
Changes:
- memoize the function this time
- check packages are installed using rpm_package_of_string
However I didn't combine the two case together, because the code is a
bit simpler with them separate.
Rich.
2019 Apr 12
6
[supermin PATCH 0/5] rpm: fix package selection w/ multilib
This patch series fixes the way supermin sorts the list of installed
packages when resolving a name, picking the right package for the host
architecture.
Pino Toscano (5):
rpm: do not unpack parameters
rpm: fix version comparison
rpm: query the RPM architecture
rpm: fix package sorting (RHBZ#1696822)
utils: remove unused 'compare_architecture' function
src/librpm-c.c | 10
2014 Sep 17
4
[PATCH 0/2] supermin: use librpm for rpm support
Hi,
this work makes supermin use the rpm library instead of invoking rpm
directly. This, together with a needed refactoring of the dependency
resolution, should help in make supermin faster on rpm-based systems.
Surely the patches will still need polishing, especially for behaviours
of newly added stuff, but at least it's a good starting point.
Noting that you need rpm-devel on most of rpm
2015 Oct 13
6
[PATCH 0/4] rpm: Choose providers better (RHBZ#1266918).
Fix for
https://bugzilla.redhat.com/show_bug.cgi?id=1266918
2014 Nov 24
5
[PATCH] rpm: use librpm's rpmvercmp
...b/src/librpm.mli
@@ -19,6 +19,7 @@
val rpm_is_available : unit -> bool
val rpm_version : unit -> string
+val rpm_vercmp : string -> string -> int
type t
diff --git a/src/rpm.ml b/src/rpm.ml
index 640a02a..ce803e1 100644
--- a/src/rpm.ml
+++ b/src/rpm.ml
@@ -144,7 +144,7 @@ let rpm_package_of_string str =
* architecture.
*)
let cmp { version = v1; arch = a1 } { version = v2; arch = a2 } =
- let i = compare_version v2 v1 in
+ let i = rpm_vercmp v2 v1 in
if i <> 0 then i
else compare_architecture a2 a1
in
--
1.9.3
2015 Oct 13
0
[PATCH 4/4] rpm: Choose providers better (RHBZ#1266918).
...rovides =
- try Hashtbl.find rpm_providers x
- with Not_found ->
- let p = rpm_pkg_whatprovides (get_rpm ()) x in
- Hashtbl.add rpm_providers x p;
- p in
- Array.fold_left (
- fun newset p ->
- match rpm_package_of_string p with
- | None -> newset
- | Some x -> StringSet.add p newset
- ) set provides
- with Not_found -> set
+ match provider x with
+ | None -> set
+ | Some p -> StringSet.add p set
) StringSet.empty reqs in
pkg...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...+let settings = ref no_settings
+
+let rpm_init s = settings := s
+
+type rpm_t = {
+ name : string;
+ epoch : int32;
+ version : string;
+ release : string;
+ arch : string;
+}
+
+(* Memo from package type to internal rpm_t. *)
+let rpm_of_pkg, pkg_of_rpm = get_memo_functions ()
+
+(* Memo of rpm_package_of_string. *)
+let rpmh = Hashtbl.create 13
+
+let rpm_package_of_string str =
+ (* Parse an RPM name into the fields like name and version. Since
+ * the package is installed (see check below), it's easier to use RPM
+ * itself to do this parsing rather than haphazardly parsing it
+ * ourselves....