proj/portage-utils:master commit in: /
"Fabian Groffen" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786790792.e1912079b572726ba3f4081f8d0b8a5c973f2610.grobian@gentoo> |
commit: e1912079b572726ba3f4081f8d0b8a5c973f2610
Author: Aleksandr keng <226012442+kengusername <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Fri Aug 14 09:33:11 2026 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 10:46:32 2026 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e1912079
sys-apps/portage-utils: quse list packages only once
Bug: https://bugs.gentoo.org/980824
Closes: https://github.com/gentoo/portage-utils/pull/39
Signed-off-by: Aleksandr keng <226012442+kengusername <AT> users.noreply.github.com>
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
quse.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/quse.c b/quse.c
index b3745800..bddd2434 100644
--- a/quse.c
+++ b/quse.c
@@ -70,6 +70,7 @@ struct quse_state {
const char *fmt;
};
+static const atom_ctx *quse_last_atom;
static char *_quse_getline_buf = NULL;
static size_t _quse_getline_buflen = 0;
#define GETLINE(FD, BUF, LEN) \
@@ -642,7 +643,13 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv)
free(us.retv);
free(us.argv);
} else {
- printf("%s: %s\n", atom_format(state->fmt, atom), v);
+ if (quse_last_atom == NULL ||
+ strcmp(atom->CATEGORY, quse_last_atom->CATEGORY) != 0 ||
+ strcmp(atom->PN, quse_last_atom->PN) != 0)
+ {
+ quse_last_atom = atom;
+ printf("%s: %s\n", atom_format(state->fmt, atom), v);
+ }
}
}