Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

formula installed by an alias are re-created every run #25

Open
indirect opened this issue Jul 23, 2013 · 3 comments
Open

formula installed by an alias are re-created every run #25

indirect opened this issue Jul 23, 2013 · 3 comments

Comments

@indirect
Copy link

The homebrew formula "jsl" is aliased to the name "jslint". With this manifest:

package { 'jslint': }

Every single run of boxen tries to install jslint again, like so:

Debug: Executing 'brew boxen-latest jslint'
Debug: Executing 'brew info jslint'
Debug: Executing 'brew boxen-install jslint'
Notice: /Stage[main]/People::Indirect/Package[jslint]/ensure: created

Homebrew is actually smart enough to not reinstall the formula that is already installed. It would be nice if the Homebrew provider was at least that smart!

@wfarr
Copy link
Contributor

wfarr commented Jul 23, 2013

I think this would be nice to fix.

My preliminary guesses would be something in

  def self.available?(name, version)
    version = nil if unversioned? version
    File.exist? File.join [home, "Cellar", simplify(name), version].compact
  end

Detecting these is somewhat hard. It would actually be really ideal for Homebrew to take a virtual package-like approach here and when an aliased package is installed to create a cellar dir for that alias that symlinks to the appropriate package.

@jacobbednarz
Copy link
Member

@indirect is this still a thing on the latest versions?

@jacobbednarz
Copy link
Member

I found Homebrew/brew#1520 which suggests the --list option now handles this behaviour correctly so we might be able to address this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants