|
|
aba816 |
From 3ce392c9870a589cc50d2270fcf07b4d129c3dc3 Mon Sep 17 00:00:00 2001
|
|
|
aba816 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
aba816 |
Date: Sat, 27 Mar 2021 09:31:00 +0000
|
|
|
aba816 |
Subject: [PATCH] inspection: Return RPM epoch.
|
|
|
aba816 |
|
|
|
aba816 |
Fixes: commit c9ee831affed55abe0f928134cbbd2ed83b2f510
|
|
|
aba816 |
(cherry picked from commit fef73bce7eec0ce0753a2e150e4e088020d38643)
|
|
|
aba816 |
---
|
|
|
aba816 |
daemon/rpm-c.c | 5 ++++-
|
|
|
aba816 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
aba816 |
|
|
|
aba816 |
diff --git a/daemon/rpm-c.c b/daemon/rpm-c.c
|
|
|
aba816 |
index 92a3abf58..be0e81e22 100644
|
|
|
aba816 |
--- a/daemon/rpm-c.c
|
|
|
aba816 |
+++ b/daemon/rpm-c.c
|
|
|
aba816 |
@@ -108,13 +108,16 @@ guestfs_int_daemon_rpm_next_application (value unitv)
|
|
|
aba816 |
|
|
|
aba816 |
h = headerLink (h);
|
|
|
aba816 |
app.app2_name = headerFormat (h, "%{NAME}", NULL);
|
|
|
aba816 |
- // XXXapp.app2_epoch = headerFormat (h, "%{NAME}", NULL);
|
|
|
aba816 |
app.app2_version = headerFormat (h, "%{VERSION}", NULL);
|
|
|
aba816 |
app.app2_release = headerFormat (h, "%{RELEASE}", NULL);
|
|
|
aba816 |
app.app2_arch = headerFormat (h, "%{ARCH}", NULL);
|
|
|
aba816 |
app.app2_url = headerFormat (h, "%{URL}", NULL);
|
|
|
aba816 |
app.app2_summary = headerFormat (h, "%{SUMMARY}", NULL);
|
|
|
aba816 |
app.app2_description = headerFormat (h, "%{DESCRIPTION}", NULL);
|
|
|
aba816 |
+
|
|
|
aba816 |
+ /* epoch is special as the only int field. */
|
|
|
aba816 |
+ app.app2_epoch = headerGetNumber (h, RPMTAG_EPOCH);
|
|
|
aba816 |
+
|
|
|
aba816 |
headerFree (h);
|
|
|
aba816 |
|
|
|
aba816 |
/* Convert this to an OCaml struct. Any NULL fields must be turned
|
|
|
aba816 |
--
|
|
|
aba816 |
2.31.1
|
|
|
aba816 |
|