Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 122082 - /usr/bin/grep missing
Summary: /usr/bin/grep missing
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 122260
  Show dependency tree
 
Reported: 2006-02-07 23:17 UTC by Christoph Schulz
Modified: 2006-02-09 08:19 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Schulz 2006-02-07 23:17:59 UTC
If emerging "sys-apps/grep", only /bin/grep is installed, no /usr/bin/grep. This is confusing, as all important (and text related) system utilities (sed, head, tail, ...) are found in /usr/bin. Additionally, in boot-time scripts /bin is not part of the search path, so all scripts that simply use "grep" instead of "/bin/grep" mysteriously fail.

I think a symbolic link /usr/bin/grep --> /bin/grep should be added, as it is the case for cp, mv, cat, sed, head, ...

Steps to reproduce:
(1) emerge sys-apps/grep
(2) ls /usr/bin/grep

Actual result:
ls: /usr/bin/grep: No such file or directory
Expected result:
/usr/bin/grep
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-02-08 01:19:21 UTC
Reopen with some error messages from your "mysteriously failing" init scripts and emerge --info. I have yet to see a single init script to fail bacause of this, besides the fact that my /usr is on LVM2 volume and there are people using NFS for this, where such symlink is completely useless until the boot is half over, yet their boxes boot just fine.
Comment 2 Christoph Schulz 2006-02-08 03:02:47 UTC
Sorry, I didn't make it clear enough what I'm concerned about. I thought about user-written shell scripts being started while booting; this includes, e.g., commands included into /etc/conf.d/local.start (I didn't mean to say "in runlevel 'boot'"). If you simply use "grep" in such a script it won't work.

Dou you mean *all* scripts that *might* be used while loading daemons (e.g. in /etc/conf.d/local.*) have to *fully qualify* all the tools they use (bin/rm, /bin/cat, /bin/sed, /bin/grep etc.), to make sure they are found? Or do you propose something like "export PATH=/bin:$PATH" at the very start of such scripts?

I simply encountered this situation with my own scripts and wondered why there is /usr/bin/sed but not /usr/bin/grep.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-02-08 03:39:12 UTC
user-written scripts = user responsibility; don't see why we should be symlinking stuff to /usr/bin because of this.
Comment 4 Christoph Schulz 2006-02-08 03:45:24 UTC
The sed-4.1.4-ebuild has:

  rm -f "${D}"/usr/bin/sed
  dosym /bin/sed /usr/bin/sed

what means that explicit symbolic links *are* provided for other basic packages. So why not for grep?
Comment 5 SpanKY gentoo-dev 2006-02-08 15:12:58 UTC
removed /usr/bin/sed symlink