Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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