commit:     6ad305d5b06906d653eb19b09de0dbcd76ebcf56
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  3 23:08:45 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jun  3 23:15:50 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ad305d5

kde-apps/konsole: Clear the arguments if the command is not found

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../konsole/files/konsole-24.12.3-clear-args.patch | 28 +++++++++
 kde-apps/konsole/konsole-24.12.3-r1.ebuild         | 67 ++++++++++++++++++++++
 2 files changed, 95 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-24.12.3-clear-args.patch 
b/kde-apps/konsole/files/konsole-24.12.3-clear-args.patch
new file mode 100644
index 000000000000..6dd9763dd378
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-24.12.3-clear-args.patch
@@ -0,0 +1,28 @@
+From 39ffddb77763a32bc3f039514265506c6be73d48 Mon Sep 17 00:00:00 2001
+From: Kurt Hindenburg <[email protected]>
+Date: Wed, 28 May 2025 18:54:39 -0400
+Subject: [PATCH] Clear the arguments if the command is not found
+
+This mimics what other terminals do.
+---
+ src/session/Session.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/session/Session.cpp b/src/session/Session.cpp
+index 81366074a7..c97ae64099 100644
+--- a/src/session/Session.cpp
++++ b/src/session/Session.cpp
+@@ -512,8 +512,10 @@ void Session::run()
+     // if a program was specified via setProgram(), but it couldn't be found 
(but a fallback was), print a warning
+     if (exec != checkProgram(_program)) {
+         terminalWarning(i18n("Could not find '%1', starting '%2' instead.  
Please check your profile settings.", _program, exec));
++        _arguments.clear(); // ignore args if program is invalid
+     } else if (exec != checkProgram(exec)) {
+         terminalWarning(i18n("Could not find '%1', starting '%2' instead.  
Please check your profile settings.", exec, checkProgram(exec)));
++        _arguments.clear(); // ignore args if program is invalid
+     }
+ 
+     // if no arguments are specified, fall back to program name
+-- 
+GitLab
+

diff --git a/kde-apps/konsole/konsole-24.12.3-r1.ebuild 
b/kde-apps/konsole/konsole-24.12.3-r1.ebuild
new file mode 100644
index 000000000000..44162a0ba453
--- /dev/null
+++ b/kde-apps/konsole/konsole-24.12.3-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="true"
+KFMIN=6.7.0
+QTMIN=6.7.2
+inherit ecm gear.kde.org
+
+DESCRIPTION="KDE's terminal emulator"
+HOMEPAGE="https://apps.kde.org/konsole/ https://konsole.kde.org";
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="6"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="X"
+
+DEPEND="
+       dev-libs/icu:=
+       >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,widgets,xml]
+       >=dev-qt/qt5compat-${QTMIN}:6
+       >=dev-qt/qtmultimedia-${QTMIN}:6
+       >=kde-frameworks/kbookmarks-${KFMIN}:6
+       >=kde-frameworks/kconfig-${KFMIN}:6
+       >=kde-frameworks/kconfigwidgets-${KFMIN}:6
+       >=kde-frameworks/kcoreaddons-${KFMIN}:6
+       >=kde-frameworks/kcrash-${KFMIN}:6
+       >=kde-frameworks/kdbusaddons-${KFMIN}:6
+       >=kde-frameworks/kglobalaccel-${KFMIN}:6
+       >=kde-frameworks/kguiaddons-${KFMIN}:6
+       >=kde-frameworks/ki18n-${KFMIN}:6
+       >=kde-frameworks/kiconthemes-${KFMIN}:6
+       >=kde-frameworks/kio-${KFMIN}:6
+       >=kde-frameworks/kjobwidgets-${KFMIN}:6
+       >=kde-frameworks/knewstuff-${KFMIN}:6
+       >=kde-frameworks/knotifications-${KFMIN}:6
+       >=kde-frameworks/knotifyconfig-${KFMIN}:6
+       >=kde-frameworks/kparts-${KFMIN}:6
+       >=kde-frameworks/kpty-${KFMIN}:6
+       >=kde-frameworks/kservice-${KFMIN}:6
+       >=kde-frameworks/ktextwidgets-${KFMIN}:6
+       >=kde-frameworks/kwidgetsaddons-${KFMIN}:6
+       >=kde-frameworks/kwindowsystem-${KFMIN}:6[X?]
+       >=kde-frameworks/kxmlgui-${KFMIN}:6
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-clear-args.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               -DWITH_X11=$(usex X)
+       )
+       ecm_src_configure
+}
+
+src_test() {
+       # DBusTest: drkonqi process interferes. bug 702690
+       # TerminalInterfaceTest: unbelievably flaky, bug 862594 and bug 662756
+       local myctestargs=(
+               -E "(DBusTest|TerminalInterfaceTest)"
+       )
+
+       ecm_src_test
+}

Reply via email to