From 2ecfc96734bcc2265c4dc9369a8b5c6dd4680713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 26 Sep 2005 13:18:15 +0000 Subject: [PATCH] =?UTF-8?q?-=20report=20build=20time=20dependencies!=20In?= =?UTF-8?q?=20the=20future,=20taking=20care=20of=20this=20dependencies=20w?= =?UTF-8?q?ill=20be=20a=20feature=20of=20P=C4=B0S=C4=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/api.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pisi/api.py b/pisi/api.py index 4cc4a79b..6c15fb91 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -499,6 +499,21 @@ def prepare_for_build(pspecfile, authInfo=None): url.uri = fs.fetch_all() pb = PisiBuild(url.uri) + + # find out the build dependencies that are not satisfied... + dep_unsatis = [] + for dep in pb.spec.source.buildDeps: + if not dependency.installed_satisfies_dep(dep): + dep_unsatis.append(dep) + + # FIXME: take care of the required buildDeps... + # For now just report an error! + if dep_unsatis: + ctx.ui.error("Unsatisfied Build Dependencies:\n") + for dep in dep_unsatis: + ctx.ui.error(dep.package) + sys.exit(1) + return pb def build(pspecfile, authInfo=None):