command_not_found_handle shows no errors when command-not-found is uninstalled

Bug #561155 reported by Anders Kaseorg
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: bash

There are two problems with the command_not_found_handle hook in /etc/bash.bashrc:

• [The first one was a dupe of bug 561046, removed.]

• If both command-not-found and command-not-found-data are uninstalled but a shell remains open from when command-not-found was installed, then bad commands yield no error message at all:

anders@balanced-tree:~$ badcommand
anders@balanced-tree:~$

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: bash 4.1-2ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-20.29-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-20-generic x86_64
NonfreeKernelModules: openafs wl nvidia
Architecture: amd64
Date: Sun Apr 11 22:57:27 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release Candidate amd64 (20091020.3)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: bash

Related branches

Revision history for this message
Anders Kaseorg (andersk) wrote :
Revision history for this message
Anders Kaseorg (andersk) wrote :

The no-error case is related to the change described in 420161 “command-not-found not working properly in karmic”: bash 4.0 no longer prints its own error message after running command_not_found_handle. (This was worked around in command-not-found by having command-not-found print its own error message.)

Revision history for this message
Anders Kaseorg (andersk) wrote :

Only half of this was a duplicate of bug 561046. I’ve repurposed this bug for the other half and unmarked it as duplicate.

summary: - command_not_found_handle misbehaves when command-not-found is
+ command_not_found_handle shows no errors when command-not-found is
uninstalled
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash - 4.2-2ubuntu1

---------------
bash (4.2-2ubuntu1) precise; urgency=low

  * Merge with Debian; remaining changes:

bash (4.2-2) unstable; urgency=low

  * Fix command-not-found location. Closes: #529313.
  * Print a replacement error message if command-not-found was removed
    after bashrc was loaded. Closes: #631023. LP: #561155.
  * skel.bashrc: Document and prepare enabling the globstar feature (Fabian
    Greffrath). Closes: #627926.
  * Apply upstream patches 021 - 024.
 -- Matthias Klose <email address hidden> Mon, 02 Apr 2012 23:58:07 +0200

Changed in bash (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.