Skip to content

Commit

Permalink
Added dependency checking code. We now have a list of packages.
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Shea <colin@evaryont.me>
  • Loading branch information
nogweii committed Jun 28, 2009
1 parent 2229b08 commit 37f6366
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/arson/download.rb
Expand Up @@ -6,6 +6,8 @@ class << self
def download(package, depends=false)
begin
real_download("http://aur.archlinux.org"+package['URLPath'])
dependences = File.readlines("#{Arson::Config["dir"]}/#{package['Name']}/PKGBUILD").grep(/^(?:make)*depends/).map{|l| l.match(/.*=\((.*)\)$/)[1].gsub("'", '').split(' ')}.flatten.uniq.sort.map{|dep| (dep.scan(/(.*?)[><=]{1,2}(.*)/).first || [dep]).first }
p dependences
rescue Errno::EEXIST => e
warn e.message
exit 2
Expand Down

0 comments on commit 37f6366

Please sign in to comment.