[Bug 812292] New: PackageKit's command_not_found_handle prints to stdout
https://bugzilla.novell.com/show_bug.cgi?id=812292 https://bugzilla.novell.com/show_bug.cgi?id=812292#c0 Summary: PackageKit's command_not_found_handle prints to stdout Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: tr@thomasrast.ch QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Firefox/17.0 conkeror/1.0pre The package PackageKit installs a script /etc/profile.d/PackageKit.sh which installs a command_not_found_handle function for bash to use when the user invokes an unknown command. This function prints to stdout (not stderr!). This is terrible because the error will be lost if one mistypes a command in the presence of redirections: $ . /etc/profile.d/PackageKit.sh $ srot foo | grep test $ time gerp foo >/dev/null real 0m0.002s user 0m0.000s sys 0m0.002s In previous versions of openSuSE it was possible to fix it by simply uninstalling the offending package (command-not-found IIRC), but this time it is tied to PackageKit! So one needs to resort to 'undef -f command_not_found_handle' in .bashrc. Reproducible: Always Steps to Reproduce: $ . /etc/profile.d/PackageKit.sh $ srot foo | grep test Actual Results: Nothing printed Expected Results: Should print 'bash: srot: command not found' to stderr. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=812292
https://bugzilla.novell.com/show_bug.cgi?id=812292#c
Xiaolong Li
https://bugzilla.novell.com/show_bug.cgi?id=812292
https://bugzilla.novell.com/show_bug.cgi?id=812292#c1
Dominique Leuenberger
https://bugzilla.novell.com/show_bug.cgi?id=812292 https://bugzilla.novell.com/show_bug.cgi?id=812292#c2 --- Comment #2 from Thomas Rast
PackageKit's c-n-f handler has actually not been touched in like 2 years... And /etc/profile.c/PackageKit.sh existed on 12.2 as well (why are you even sourcing it if you don't want to use it?)
I'm not sourcing it. The example was merely to ensure that you get the same results. My point is that it's broken in a default install: /etc/profile automatically sources /etc/profile.d/*. I'm not going to argue the merits of a command_not_found_handle; I don't want one, but I can see why it is nice to have one by default. But it MUST print to stderr. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=812292
https://bugzilla.novell.com/show_bug.cgi?id=812292#c3
Dominique Leuenberger
participants (1)
-
bugzilla_noreply@novell.com