lib/kosmos/package.rb in kosmos-0.0.4 vs lib/kosmos/package.rb in kosmos-0.0.5
- old
+ new
@@ -76,18 +76,22 @@
private
def install_prerequisites!
resolve_prerequisites.each do |package|
- Util.log "#{title} has prerequisite #{package.title}."
- package.new.install!(ksp_path)
+ unless Versioner.installed_packages(ksp_path).include?(package.title)
+ Util.log "#{title} has prerequisite #{package.title}."
+ package.new.install!(ksp_path)
+ end
end
end
def install_postrequisites!
resolve_postrequisites.each do |package|
- Util.log "#{title} has postrequisite #{package.title}."
- package.new.install!(ksp_path)
+ unless Versioner.installed_packages(ksp_path).include?(package.title)
+ Util.log "#{title} has postrequisite #{package.title}."
+ package.new.install!(ksp_path)
+ end
end
end
# Now, let's include all the known packages.
Dir[File.join(File.dirname(__FILE__), 'packages', '*.rb')].each do |file|