summaryrefslogtreecommitdiff
path: root/dev-util/perf
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/perf')
-rw-r--r--dev-util/perf/files/perf-6.18-subcmd.patch27
-rw-r--r--dev-util/perf/perf-6.18-r1.ebuild (renamed from dev-util/perf/perf-6.18.ebuild)1
2 files changed, 28 insertions, 0 deletions
diff --git a/dev-util/perf/files/perf-6.18-subcmd.patch b/dev-util/perf/files/perf-6.18-subcmd.patch
new file mode 100644
index 000000000000..e3e067efdd07
--- /dev/null
+++ b/dev-util/perf/files/perf-6.18-subcmd.patch
@@ -0,0 +1,27 @@
+Fix for --help command when no commands are excluded.
+
+Link: https://lore.kernel.org/lkml/20251202213632.2873731-1-sjayaram@akamai.com/
+
+See also: https://lore.kernel.org/lkml/aTXQw9dtP5df7LmP@gentoo.org/
+
+--- a/tools/lib/subcmd/help.c
++++ b/tools/lib/subcmd/help.c
+@@ -97,11 +97,13 @@ void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes)
+ ei++;
+ }
+ }
+- if (ci != cj) {
+- while (ci < cmds->cnt) {
+- cmds->names[cj++] = cmds->names[ci];
+- cmds->names[ci++] = NULL;
++ while (ci < cmds->cnt) {
++ if (ci != cj) {
++ cmds->names[cj] = cmds->names[ci];
++ cmds->names[ci] = NULL;
+ }
++ ci++;
++ cj++;
+ }
+ for (ci = cj; ci < cmds->cnt; ci++)
+ assert(cmds->names[ci] == NULL);
+--
diff --git a/dev-util/perf/perf-6.18.ebuild b/dev-util/perf/perf-6.18-r1.ebuild
index 584037462fc0..eef384583894 100644
--- a/dev-util/perf/perf-6.18.ebuild
+++ b/dev-util/perf/perf-6.18-r1.ebuild
@@ -177,6 +177,7 @@ src_prepare() {
pushd "${S_K}" >/dev/null || die
# Gentoo patches go here
+ eapply "${FILESDIR}/${P}-subcmd.patch"
popd || die
# Drop some upstream too-developer-oriented flags and fix the