From 145e33abdf0670919d1e22540da694dbd91ed135 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sun, 30 Aug 2009 16:11:44 +0100 Subject: Better cache names for accessory-formula Because formula don't get named unless the brew kit instantiates them accessory formula were getting named "__UNKNOWN__". Which sucks. This isn't ideal for me as I made the naming use @name and @version to ensure unique naming. Now it is possible to have name clashes in the cache. So I need to solve it better at some point.--- Library/Homebrew/download_strategy.rb | 8 ++++++-- Library/Homebrew/formula.rb | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'Library/Homebrew') diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 5453645a2..6a7ee5e35 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -18,14 +18,18 @@ class AbstractDownloadStrategy def initialize url, name, version @url=url - @unique_token="#{name}-#{version}" + @unique_token="#{name}-#{version}" unless name.to_s.empty? or name == '__UNKNOWN__' end end class HttpDownloadStrategy