rpm/rpm-5.4.8-dont-show-suggests-with-requires.patch
2013-03-27 12:51:15 +04:00

62 lines
1.8 KiB
Diff

--- rpm-5.4.8/rpmdb/hdrfmt.c.suggests~ 2012-04-25 17:58:22.721144146 +0200
+++ rpm-5.4.8/rpmdb/hdrfmt.c 2012-04-25 18:33:32.293704707 +0200
@@ -1607,6 +1607,38 @@ static const char * bfstring(unsigned in
#endif
/**
+ * 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
@@ -5201,6 +5233,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.8/rpmpopt.in.suggests~ 2012-04-25 17:58:22.439141788 +0200
+++ rpm-5.4.8/rpmpopt.in 2012-04-25 18:33:32.295704719 +0200
@@ -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