Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

brew doctor: Check for CaSe SeNsItIvE fs #16658

Closed
wants to merge 1 commit into from

6 participants

@samueljohn

No description provided.

@adamv
Owner

Any objections here? (I can't test.)

@mikemcquaid
Owner

Seems reasonable assuming it works (can't test either).

@samueljohn

@lotlorien, may I ping you since you raised one issue with your case sensitive Mac?

Do you still have access to that Mac? Can you test this pull request here?
Let me know if you need assistance with cd $(brew --prefix), git checkout -b testing_case_sensitive and brew pull 16658

@lotlorien

Hi samueljohn,

I'm sorry but I don't because I switched to MacPorts for the following reasons:

(1) Homebrew has less than 2000 packages, MacPorts over 15'000. So if you want access to open source on the Mac, MacPors is the way to go in my opinion.

(2) I prefer the philosophy of MacPorts of one single, up-to-date, clean and self-consistent repository, similar to BSD and Arch Linux (from where I switched to OS X). I assume that Homebrew's idea of using Apple's installed stuff will run into real trouble once major system updates from Apple come, and these will come. Also, Apple's installed stuff is often quite out of date, so Homebrew has to go with old packages.

(3) MacPorts creates /opt/ and puts all in there, which seems more clean to me than messing with my /usr/local/ as Homebrew does.

Best wishes,

lotlorien

@mikemcquaid mikemcquaid closed this pull request from a commit
@samueljohn samueljohn brew doctor: Check for CaSe SeNsItIvE fs
Closes #16658.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
238a2f0
@samueljohn

@lotlorien good luck then :-) I disagree with almost all points, except 1) perhaps.

  1. Which formulae are you missing? Are these 15000 up-to-date?
  2. We fix faster than Apple breaking stuff ;-)
  3. You can install (now that we have superenv) in /opt or somewhere else, too. I did. 98% works.

cu :-)

@zedtux

Hi,

Executing brew doctor reported me:

Warning: Your file-system on / appears to be CaSe SeNsItIvE.
Homebrew is less tested with that - don't worry but please report issues.

So I am reporting it :-)

Could I help ?

@samueljohn

@zedtux, I assume you FS is indeed case sensitive, right? So this test is working. Yay.

Don't worry, we want to support that too. It's just to keep an eye open on that on. Perhaps when some software uses a path (for includes or whatever) and then fails to find it, because the case is different.

I wonder what the default is for brand new Macs.

@zedtux

Screen Shot 2013-02-01 at 11 56 43 AM

It seems that my FS is case sensitive :)

@mikemcquaid
Owner

@zedtux Can you show us your Mac model etc.? As Samuel says, don't worry about this but just include it in any bug reports.

@njam

I don't like this change because:
All the macs in our office are formatted with "case sensitive" filesystem.
Our mac deployment runs brew doctor after the install to make sure everything's ok. Since now brew doctor exits with value 1 the deployment reports an error.

Shouldn't this be converted in some kind of informational message, which would not let brew doctor fail?

@adamv
Owner

Don't rely on the output of brew doctor for scripting; there is always the possibility that it will report ignorable warnings.

@mikemcquaid
Owner

Or run brew doctor | grep -v to ignore a specific warning, don't use case sensitive filesystems or make a pull request to allow selectively ignoring brew doctor warnings.

@njam

Ok I see, I will remove it from our script then.
The docu is maybe not so clear about it (Check your system for potential problems. Doctor exits with a non-zero status if any problems are found.).
Thanks.

@mikemcquaid
Owner

It is a "potential" problem as it breaks some formula. Lots of software assumes case insensitivity on OSX (because it was the case for a long time).

@njam

You're right :)
"allow selectively ignoring brew doctor warnings" would probably be the best. Unfortunately I cannot do it, so I will remove it from our scripts for now.

@dholm dholm referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@samueljohn

In related, we should have warnings and errors. This check should be a warning, rather than an error.

@zedtux

@mikemcquaid is this what you was looking for ?
Screen Shot 2013-02-03 at 10 18 07 PM

@samueljohn

I have a very similar Mac but I restored from TimeMachine, so I don't know the preset for a virgin OS X these days.

@njam

OSX 10.8 formats the disk "case insensitive" by default

@mikemcquaid
Owner

That's good cheers. If it's case insensitive by default that makes our lives easier and reconfirms the choice for this brew doctor warning.

@fgeller fgeller referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@n1k0 n1k0 referenced this pull request from a commit
@samueljohn samueljohn brew doctor: Check for CaSe SeNsItIvE fs
Closes #16658.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
6f9bb57
@cooljeanius cooljeanius referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@Sharpie Sharpie referenced this pull request from a commit in Sharpie/homebrew
@samueljohn samueljohn brew doctor: Check for CaSe SeNsItIvE fs
Closes #16658.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
9c2af30
@erbmicha erbmicha referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@phatblat phatblat referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 11, 2013
  1. @samueljohn
This page is out of date. Refresh to see the latest.
Showing with 22 additions and 0 deletions.
  1. +22 −0 Library/Homebrew/cmd/doctor.rb
View
22 Library/Homebrew/cmd/doctor.rb
@@ -692,6 +692,28 @@ def check_for_multiple_volumes
end
end
+def check_filesystem_case_sensitive
+ volumes = Volumes.new
+ tmp_prefix = Pathname.new(ENV['HOMEBREW_TEMP'] || '/tmp')
+ case_sensitive_vols = [HOMEBREW_PREFIX, HOMEBREW_REPOSITORY, HOMEBREW_CELLAR, tmp_prefix].select do |dir|
+ # We select the dir as being case-sensitive if either the UPCASED or the
+ # downcased variant is missing.
+ # Of course, on a case-insensitive fs, both exist because the os reports so.
+ # In the rare situation when the user has indeed a downcased and an upcased
+ # dir (e.g. /TMP and /tmp) this check falsely thinks it is case-insensitive
+ # but we don't care beacuse: 1. there is more than one dir checked, 2. the
+ # check is not vital and 3. we would have to touch files otherwise.
+ upcased = Pathname.new(dir.to_s.upcase)
+ downcased = Pathname.new(dir.to_s.downcase)
+ dir.exist? && !(upcased.exist? && downcased.exist?)
+ end.map { |case_sensitive_dir| volumes.get_mounts(case_sensitive_dir) }.uniq
+ return if case_sensitive_vols.empty?
+ <<-EOS.undent
+ Your file-system on #{case_sensitive_vols} appears to be CaSe SeNsItIvE.
+ Homebrew is less tested with that - don't worry but please report issues.
+ EOS
+end
+
def check_for_git
unless which "git" then <<-EOS.undent
Git could not be found in your PATH.
Something went wrong with that request. Please try again.