aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2011-09-21 17:14:54 -0500
committerJack Nagel2011-09-21 17:29:14 -0500
commitfaada11b79845dd1a81da4fe2fde0190381ef1a5 (patch)
treea77b5f10c55e18f60ded1720f50c0c056527ceb3 /Library
parent93ffeeeca0f7506bb6b59900b2d70d62eba96411 (diff)
downloadhomebrew-faada11b79845dd1a81da4fe2fde0190381ef1a5.tar.bz2
Correctly parse ImageMagick bottle version
Commit 2695821e98 ("Only use the bottle if its version is up-to-date") essentially broke the ImageMagick bottle, because the version parsing logic returns "1" as the bottle version. Fixing this requires only a slight modification to the bottle URL regex; includes a test. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb2
-rw-r--r--Library/Homebrew/test/test_versions.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 2f23af7e5..095a0aa1a 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -165,7 +165,7 @@ class Pathname
return $1 if $1
# brew bottle style e.g. qt-4.7.3-bottle.tar.gz
- /-((\d+\.)*\d+)-bottle$/.match stem
+ /-((\d+\.)*\d+(-\d)*)-bottle$/.match stem
return $1 if $1
# eg. otp_src_R13B (this is erlang's style)
diff --git a/Library/Homebrew/test/test_versions.rb b/Library/Homebrew/test/test_versions.rb
index 1febdab0a..5714c4b66 100644
--- a/Library/Homebrew/test/test_versions.rb
+++ b/Library/Homebrew/test/test_versions.rb
@@ -164,4 +164,9 @@ class VersionTests < Test::Unit::TestCase
check 'https://downloads.sourceforge.net/project/machomebrew/Bottles/qt-4.7.3-bottle.tar.gz',
'4.7.3'
end
+
+ def test_imagemagick_bottle_style
+ check 'http://downloads.sf.net/project/machomebrew/Bottles/imagemagick-6.7.1-1-bottle.tar.gz',
+ '6.7.1-1'
+ end
end