Skip to content

Commit

Permalink
Meta packages don't need versions
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Jul 22, 2009
1 parent 5943a78 commit c3db36a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rip/installer.rb
Expand Up @@ -30,7 +30,7 @@ def install(package, parent = nil)
return if installed
@installed[package.name] = package

if !package.version
if !package.meta_package? && !package.version
ui.abort "can't install #{package} - it has no version"
end

Expand Down
2 changes: 1 addition & 1 deletion lib/rip/package.rb
Expand Up @@ -55,7 +55,7 @@ def self.for(source, *args)
end

def to_s
"#{name} (#{version})"
version ? "#{name} (#{version})" : name.to_s
end

memoize :cache_name
Expand Down
4 changes: 4 additions & 0 deletions lib/rip/packages/ripfile_package.rb
Expand Up @@ -15,6 +15,10 @@ def name
source.split('/').last
end

def version
nil
end

def meta_package?
true
end
Expand Down

0 comments on commit c3db36a

Please sign in to comment.