Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2025 - case insensitivity in portage
Summary: case insensitivity in portage
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: Low trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 11101 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-23 02:14 UTC by Matt Boehlig
Modified: 2011-10-30 22:18 UTC (History)
4 users (show)

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


Attachments
Change command line arguments to lowercase (patch.txt,424 bytes, patch)
2003-12-22 17:52 UTC, Michael Cook
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Boehlig 2002-04-23 02:14:24 UTC
Many of the packages in portage do not follow the standard uppercase / lowercase naming convention  
specified in "Gentoo Linux Developers HOWTO" [http://www.gentoo.org/doc/gentoo-howto.html].  This is  
currently a cosmetic bug which could lead to bigger problems in the future.  It is better to attack  
the problem quickly so we don't have a backlog of misnamed packages when the list becomes very large.   
Also, if the dependcy checker in Portage is case-sensitive, then when a package's name is corrected,  
all dependant ebuild files must also change.  
  
There are also differences in the behaviour of emerge.  Searches are case-insensitive while installs  
are case-sensitive. (seperate bug perhaps, or by design) 
  
An example:  x11-wm/WindowMaker  
  
# emerge -s windowmaker    finds WindowMaker  
# emerge windowmaker       cannot find WindowMaker
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-04-23 17:06:01 UTC
Seemant: how about tackling these?
Comment 2 SpanKY gentoo-dev 2002-07-04 23:28:18 UTC
is any work being done on this or has it been tossed to the backburner ?
new packages are being added with the naming problem ... plus ebuilds are using 
things like 'DEPEND=dev-perl/Net-DNS'

if its a matter of not enough time i'd be willing to donate time to taking care 
of this
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2002-07-05 09:24:17 UTC
actually, it seems like case insensitivity is being built into portage at some point
Comment 4 Bart Verwilst 2002-07-13 17:52:45 UTC
 Yeah, we (drobbins and me) just discussed that(if you can even call it a discussion :o) We just mentioned it actually, to make Portage case-insensitive some time in the near future. 
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2002-08-28 07:00:46 UTC
Daniel, since we've mentioned this before that portage itself will have this
functionality, I'm reassigning this to you and nick
Comment 6 SpanKY gentoo-dev 2002-11-22 15:37:45 UTC
*** Bug 11101 has been marked as a duplicate of this bug. ***
Comment 7 Sankara Krishnamoorthy 2003-05-05 05:41:16 UTC
if portage is case-insensitive:

 - a package named Xyz is already in portage
 - somebody writes a package named - xyZ - coolest software around - everybody wants it. so how can this be added to portage?

 1. rename one of them and let everyone know about it?
 2. emerge xyz will return multiple packages(will require searching all packages) - prompt user which one she wants
    1) Xyz
    2) xyZ
    3) get-everything
    
One might argue that, no-one will ever name a new package like that.

Comment 8 Michael Cook 2003-12-20 17:19:34 UTC
Well making portage case-insensitive could be as simple as converting the command line to lowercase before any other processing is done. I could write a simple patch to do it, but then packages that are improperly named in portage (LinNeightborhood for example) would become untouchable (couldn't install or remove them with emerge).

As for the Xyz versus xyZ problem, I seriously doubt such a thing would come up. Other distributions (like <a href="http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Package">Debian</a>) require all names to be lower case too, so it would be an issue that the software's authors had probably already come across. There is also slightly changing the names to avoid a conflict (as in firebird and mozilla-firebird).
Comment 9 Michael Cook 2003-12-22 17:52:30 UTC
Created attachment 22564 [details, diff]
Change command line arguments to lowercase

I attached a simple patch that converts every command line argument that
doesn't start with hyphens to lowercase before being processed. This means that
things like

emerge WindowMaker

now work when they didn't before (because windowmaker is lowercase in the
portage tree), but this patch also makes some programs (like LinNeighborhood)
untouchable as I mentioned in my comment above.
Comment 10 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2004-12-30 05:22:19 UTC
Anything new on this?
Comment 11 Jason Stubbs (RETIRED) gentoo-dev 2005-06-17 10:07:29 UTC
I'd consider this a WONTFIX personally. Does it offer anything other than 
easing a transition of "misnamed" packages that could be eased in other ways 
anyway? 
Comment 12 Matt Boehlig 2005-06-18 12:12:17 UTC
The reason I originally entered this bug was because I noticed a discrepancy
between the recommendation in the documentation (ebuild names should be all
lower case) and actual ebuild names. Documentation is now located at
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1#doc_chap2
under the heading "Naming ebuild files". Unless comment #3 is going to come true
sometime soon and there is a *real good* reason why we need case insensitivity
in portage itself we can close this bug, or keep reading for another idea.

The proposed patch would only work if all packages were lowercase and following
the docs. I do not think that renaming all packages to lowercase is a good or
easy idea. And some packages are more readable mixed case, especially when
following upstream naming, such as: perl modules -> Apache-DBI and PHP modules
-> PEAR-Net_SMTP.

Maybe the best thing to do is to change the documentation. Recommend all
lowercase package names except for certain cases such as Apache::DBI and such.
But it's hard to know where to draw the line. WindowMaker is now "windowmaker"
in portage while LinNeighborhood is still mixed case. Don't try to fix all the
existing packages into lowercase, but enforce/recommend it for new packages as
already stated in the docs: "We have some packages in Portage that don't follow
these rules, but your packages should."
Comment 13 Brian Harring gentoo-dev 2005-10-01 05:58:25 UTC
Portage isn't going to go case insensitive anytime soon...

aside from that, docs recommend doing lower case (which is enough imo).