Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 155814 - eselect should clear rm alias & function
Summary: eselect should clear rm alias & function
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-11-20 16:07 UTC by Craig Lawson
Modified: 2009-05-18 20:16 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 Craig Lawson 2006-11-20 16:07:10 UTC
I ran "eselect opengl set ati", and it hung after "Switching to ati OpenGL interface...". I'd never run it before, so I didn't know what to expect. Killed it after 10 minutes. After analyzing the exection with strace, I found the problem: eselect is a bash script, and my own bash function rm() { /usr/bin/rm -i "$@" } was waiting for input. Entirely my fault. But rm did not display a prompt.

Even so, I have some suggestions for the eselect script:
  1. Don't block prompts from rm. I don't know where it's happening, but it is. I have the same issue with revdep-rebuild, except it displays prompts from rm.
  2. When the eselect starts, run "unset -f rm" and "unalias rm" to clean out the crazy stuff users come up with.
Comment 1 Danny van Dyk (RETIRED) gentoo-dev 2007-03-20 03:11:02 UTC
Should be fixed in both 1.0.x branch and trunk/
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-02-05 09:09:11 UTC
(In reply to comment #1)
> Should be fixed in both 1.0.x branch and trunk/

Should == it's fixed, or == should be done and still nothing? 

Comment 3 Ulrich Müller gentoo-dev 2009-04-18 06:35:09 UTC
I've committed the following fix for bin/eselect.in to the SVN trunk (r459), i.e. it is targeted for eselect-1.1.

+# Remove all alias definitions. Unset functions and variables that are
+# known to cause trouble.
+"unalias" -a
+unset -f rm
+unset CDPATH GLOBIGNORE
+IFS=$' \t\n'
Comment 4 Ulrich Müller gentoo-dev 2009-05-18 20:16:52 UTC
Fixed in eselect-1.1_rc1.