Bug 102490
Summary: | Bash builtin enable command clashes with binary enable command | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Nick Marsh <nmarsh1> | ||||||
Component: | cups | Assignee: | Tim Waugh <twaugh> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 9 | CC: | michael, mitr, rdieter, robert2 | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2004-02-06 16:03:01 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: | |||||||||
Attachments: |
|
Description
Nick Marsh
2003-08-15 21:26:03 UTC
You can override bash builtin commands by simply creating an alias. $ alias enable=/usr/bin/enable You can add this to your local .bashrc or system-wide, if necessary. While it's unfortunate, it's not really something that can be fixed. :-( I believe Debian renamed the command cups-enable (and cups-disable). That's not a bad idea. Next build will pick this up. Great job, great idea.Thanks! Correction: Debian didn´t rename the commands cups-enable and cups-disable. What they did is symlink cupsaccept, cupsreject, cupsdisable and cupsenable to /usr/sbin/accept (much like reject, disable, and enable are already symlinks to accept), and patch accept.c to strip the cups prefix from the commands. The advantage of that solution is that it doesn´t break current behavior. Whatever method is chosen, I think it would be a good idea to use Debian´s names for the commands (i.e. without the hyphen) for better consistency between distros. One area that needed some work in the Debian patch that I looked at (the one for Woody) are the manpages. Looks like they only added symlinks to the original manpages, which means 'man cupsenable' displays usage instructions for the enable command. Created attachment 100601 [details]
1st hunk is patch, 2nd shows all symlinks.
This was extracted from Debian Woody's cupsys_1.1.14-5.diff. As you can see,
accept determines what to do based on how it was called (argv[0]). The patch
strips the cups prefix and then lets accept continue as usual. Ideally, the
manpages for accept, reject, enable, disable should be patched to mention
cupsaccept, etc as well.
Created attachment 100804 [details]
Patch including symlinks and manpages
I've made a patch that includes hunks for symlinks and manpages. I hope it does
all that's required. Note that I've used cupsdisable and cupsenable without the
hyphens. This is for consistency with Debian systems and with other commands
provided by CUPS such as cupstestppd and cupsaddsmb.
Thanks. I've incorporated this into 1.1.21-0.rc1.1. |