Bug 731911
Summary: | PackageKit-command-not-found makes bash cache filepaths to programs deleted in session | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jens Petersen <petersen> |
Component: | PackageKit | Assignee: | Richard Hughes <richard> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 16 | CC: | jonathan, maxamillion, rhughes, richard, rrakus, smparrish |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-19 11:04:48 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jens Petersen
2011-08-19 02:33:41 UTC
This also happens with F15, and I have probably seen it on F14 too and maybe even earlier. Isn't bash just calling the command-not-found callback erroneously? PackageKit doesn't do anything smart, it just runs when bash tells it to. Bash is calling command not found handler whenever (it is defined and when) you try run a command which is not found. The problem is in way how bash is trying to found it. Bash is using hash table to remember commands already run. You can clear that hash table, don't use it all, but default is hash table turned on. That means, you run a command, bash will remember full location and then will try tu run it on that location. The strange thing here is; $ rm ~/bin/myprog $ myprog 2. I will expect here "command not found" message. (In reply to comment #3) > The strange thing here is; > $ rm ~/bin/myprog > $ myprog > 2. > > I will expect here "command not found" message. I'm getting this message. You have three solutions; 1) turn off hash tables (set +h) 2) clear hash table (hash -d) 3) turn on option that will force lookup for binary when the binary is not found on location specified in hash table - look at man page (shopt -s checkhash) I will close this bug as notabug. Did this behaviour change at some point in the not so distant past? I am pretty sure this was not always the case - I still assumed not needing to (run) rehash was one of the advantages of bash. Is the default for security reasons or to avoid superfluous stat'ing? It seems I should run "hash myprog" to workaround this. |