Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 822033 - sys-apps/portage: bash_command_not_found_re does not detect command not found when sh is busybox
Summary: sys-apps/portage: bash_command_not_found_re does not detect command not found...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
Depends on:
Blocks: nonbash
  Show dependency tree
Reported: 2021-11-06 00:06 UTC by Zac Medico
Modified: 2022-06-18 17:48 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2021-11-06 00:06:59 UTC
Continued from bug 727832 comment 6, bash_command_not_found_re does not handle the case where sh is busybox:

> $ ash -c 'foo'
> ash: foo: not found

lib/portage/package/ebuild/    bash_command_not_found_re = re.compile(
lib/portage/package/ebuild/        r"(.*): line (\d*): (.*): command not found$"
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-11-06 07:33:07 UTC
If sh is busybox, then command-not-found detection not working properly is the least of our worries.  IIRC busybox sh isn't POSIX-compliant.
Comment 2 Fabian Groffen gentoo-dev 2021-11-06 07:58:09 UTC
While at it:

% dash -c foo
dash: 1: foo: not found
Comment 3 orbea 2022-06-18 17:22:55 UTC
Another one...

$ mksh -c 'foo'
mksh: foo: inaccessible or not found