Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

startup_script approach defaulting without executable permissions #7353

Closed
trevor opened this issue Sep 1, 2011 · 4 comments
Closed

startup_script approach defaulting without executable permissions #7353

trevor opened this issue Sep 1, 2011 · 4 comments

Comments

@trevor
Copy link
Contributor

trevor commented Sep 1, 2011

% umask
022
% brew install apgdiff
==> Downloading http://downloads.sourceforge.net/project/apgdiff/apgdiff/apgdiff-1.4/apgdiff-1.4-bin.zip
File already downloaded in /Users/jw/Library/Caches/Homebrew
/usr/local/Cellar/apgdiff/1.4: 3 files, 68K, built in 2 seconds
% ls -log /usr/local/Cellar/apgdiff/1.4/bin/apgdiff
-r--r--r--  1     83B Aug 31 22:20 /usr/local/Cellar/apgdiff/1.4/bin/apgdiff
% 
@adamv
Copy link
Contributor

adamv commented Sep 1, 2011

I don't understand.

@trevor
Copy link
Contributor Author

trevor commented Sep 1, 2011

installed scripts should be executable, none of mine are when using this method

@mxcl
Copy link
Contributor

mxcl commented Sep 1, 2011

$ umask
0022
$ ls -l /usr/local/Cellar/apgdiff/1.4/bin/apgdiff
-r-xr-xr-x  1 mxcl  admin  83  1 Sep 11:02 /usr/local/Cellar/apgdiff/1.4/bin/apgdiff

@trevor
Copy link
Contributor Author

trevor commented Sep 1, 2011

found it

  1. error occurs when /usr/local/bin precedes /usr/bin

  2. i recently updated file and installed in /usr/local/bin/file - see https://github.com/adamv/homebrew-alt/blob/master/duplicates/file-formula.rb

  3. when /usr/local/bin/file is used, the executable bit is not set, it is with /usr/bin/file

i don't know enough about the internals to know where to go from here for an ultimate fix


bash$ /usr/bin/file --version
file-5.04
magic file from /usr/share/file/magic


bash$ /usr/local/bin/file --version
file-5.08
magic file from /usr/local/Cellar/file-formula/5.08/share/misc/magic


bash$ export PATH=/bin:/usr/bin:/usr/local/bin
bash$ echo $PATH
/bin:/usr/bin:/usr/local/bin
bash$ brew install apgdiff; ls -log /usr/local/Cellar/apgdiff/1.4/bin/apgdiff; brew uninstall apgdiff
==> Downloading http://downloads.sourceforge.net/project/apgdiff/apgdiff/apgdiff-1.4/apgdiff-1.4-bin.zip
File already downloaded in /Users/jw/Library/Caches/Homebrew
/usr/local/Cellar/apgdiff/1.4: 3 files, 68K, built in 2 seconds
-r-xr-xr-x  1   83 Sep  1 05:53 /usr/local/Cellar/apgdiff/1.4/bin/apgdiff
Uninstalling /usr/local/Cellar/apgdiff/1.4...


bash$ export PATH=/bin:/usr/local/bin:/usr/bin
bash$ echo $PATH
/bin:/usr/local/bin:/usr/bin
bash$ brew install apgdiff; ls -log /usr/local/Cellar/apgdiff/1.4/bin/apgdiff; brew uninstall apgdiff
==> Downloading http://downloads.sourceforge.net/project/apgdiff/apgdiff/apgdiff-1.4/apgdiff-1.4-bin.zip
File already downloaded in /Users/jw/Library/Caches/Homebrew
/usr/local/Cellar/apgdiff/1.4: 3 files, 68K, built in 2 seconds
-r--r--r--  1   83 Sep  1 05:53 /usr/local/Cellar/apgdiff/1.4/bin/apgdiff
Uninstalling /usr/local/Cellar/apgdiff/1.4...


bash$ mv /usr/local/bin/file /usr/local/bin/file.disabled


bash$ echo $PATH
/bin:/usr/local/bin:/usr/bin
bash$ brew install apgdiff; ls -log /usr/local/Cellar/apgdiff/1.4/bin/apgdiff; brew uninstall apgdiff
==> Downloading http://downloads.sourceforge.net/project/apgdiff/apgdiff/apgdiff-1.4/apgdiff-1.4-bin.zip
File already downloaded in /Users/jw/Library/Caches/Homebrew
/usr/local/Cellar/apgdiff/1.4: 3 files, 68K, built in 2 seconds
-r-xr-xr-x  1   83 Sep  1 05:54 /usr/local/Cellar/apgdiff/1.4/bin/apgdiff
Uninstalling /usr/local/Cellar/apgdiff/1.4...


bash$ mv /usr/local/bin/file.disabled /usr/local/bin/file


bash$ echo $PATH
/bin:/usr/local/bin:/usr/bin
bash$ brew install apgdiff; ls -log /usr/local/Cellar/apgdiff/1.4/bin/apgdiff; brew uninstall apgdiff
==> Downloading http://downloads.sourceforge.net/project/apgdiff/apgdiff/apgdiff-1.4/apgdiff-1.4-bin.zip
File already downloaded in /Users/jw/Library/Caches/Homebrew
/usr/local/Cellar/apgdiff/1.4: 3 files, 68K, built in 2 seconds
-r--r--r--  1   83 Sep  1 05:54 /usr/local/Cellar/apgdiff/1.4/bin/apgdiff
Uninstalling /usr/local/Cellar/apgdiff/1.4...

@mxcl mxcl closed this as completed in 686f727 Sep 1, 2011
Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 19, 2011
martinploeger pushed a commit to martinploeger/homebrew that referenced this issue Oct 8, 2011
etehtsea pushed a commit to etehtsea/homebrew that referenced this issue Dec 27, 2011
casallas pushed a commit to casallas/homebrew that referenced this issue Sep 13, 2012
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants