Skip to content

Instantly share code, notes, and snippets.

@vlad-shatskyi
Created February 10, 2013 22:21
Show Gist options
  • Save vlad-shatskyi/4751299 to your computer and use it in GitHub Desktop.
Save vlad-shatskyi/4751299 to your computer and use it in GitHub Desktop.
def foo(dep, sym)
dep = dep.partition(/[<>=]{1,2}/)
name = dep[0]
intervall = Version.get_interval dep[1..2].join
pkg = Package.new(name, intervall)
unless Pacman.installed? pkg
if Pacman.available? pkg
@dependencies[sym] << pkg
else
pkg = AurQuery.getpkg pkg
raise UnsolvableDependencyError pkg.to_s if pkg.nil?
@dependencies[sym] << pkg
end
end
end
@info[:makedepends].each {} |dep| foo(dep, :make) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment