mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 18:33:04 +00:00
62 lines
1.7 KiB
Diff
62 lines
1.7 KiB
Diff
--- rpm-5.4.4/rpmdb/hdrfmt.c.suggests~ 2011-11-26 02:53:41.909644462 +0100
|
|
+++ rpm-5.4.4/rpmdb/hdrfmt.c 2011-11-26 02:53:45.520695846 +0100
|
|
@@ -1551,6 +1551,38 @@ assert(ix == 0);
|
|
}
|
|
|
|
/**
|
|
+ * Format dependency flags for display.
|
|
+ * @param he tag container
|
|
+ * @param av parameter list (or NULL)
|
|
+ * @return formatted string
|
|
+ */
|
|
+static /*@only@*/
|
|
+char * hintFormat(HE_t he, /*@unused@*/ /*@null@*/ const char ** av)
|
|
+ /*@*/
|
|
+{
|
|
+ int ix = (he->ix > 0 ? he->ix : 0);
|
|
+ char * val;
|
|
+
|
|
+assert(ix == 0);
|
|
+ if (he->t != RPM_UINT64_TYPE) {
|
|
+ val = xstrdup(_("(invalid type)"));
|
|
+ } else {
|
|
+ rpmuint64_t anint = he->p.ui64p[ix];
|
|
+ char *t, *buf;
|
|
+
|
|
+ t = buf = alloca(32);
|
|
+ *t = '\0';
|
|
+
|
|
+ if (anint & RPMSENSE_MISSINGOK)
|
|
+ t = stpcpy(t, "(hint)");
|
|
+ *t = '\0';
|
|
+
|
|
+ val = xstrdup(buf);
|
|
+ }
|
|
+
|
|
+ return val;
|
|
+}
|
|
+/**
|
|
* Retrieve install prefixes.
|
|
* @param h header
|
|
* @retval *he tag container
|
|
@@ -5143,6 +5175,8 @@ static struct headerSprintfExtension_s _
|
|
{ .fmtFunction = digestFormat } },
|
|
{ HEADER_EXT_FORMAT, "fflags",
|
|
{ .fmtFunction = fflagsFormat } },
|
|
+ { HEADER_EXT_FORMAT, "hint",
|
|
+ { .fmtFunction = hintFormat } },
|
|
{ HEADER_EXT_FORMAT, "iconv",
|
|
{ .fmtFunction = iconvFormat } },
|
|
{ HEADER_EXT_FORMAT, "json",
|
|
--- rpm-5.4.4/rpmpopt.in.suggests~ 2011-11-26 02:53:55.297834650 +0100
|
|
+++ rpm-5.4.4/rpmpopt.in 2011-11-26 02:54:34.101380884 +0100
|
|
@@ -98,7 +98,8 @@ rpm alias --provides --qf \
|
|
--POPTdesc=$"list capabilities that this package provides"
|
|
|
|
rpm alias --requires --qf \
|
|
- "[%{REQUIRENAME}%{REQUIREFLAGS:depflags}%{REQUIREVERSION}\n]" \
|
|
+ "[%{REQUIRENAME}%{REQUIREFLAGS:hint:depflags}%{REQUIREVERSION}\n]" \
|
|
+ --pipe "grep -v \(hint\)" \
|
|
--POPTdesc=$"list capabilities required by package(s)"
|
|
rpm alias -R --requires
|
|
|