From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Skk7U-0006a3-9U for garchives@archives.gentoo.org; Fri, 29 Jun 2012 22:56:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68062E058A; Fri, 29 Jun 2012 22:56:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 36F86E058A for ; Fri, 29 Jun 2012 22:56:48 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 554211B4018 for ; Fri, 29 Jun 2012 22:56:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id AA684E544F for ; Fri, 29 Jun 2012 22:48:23 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1341009964.669e6011375710c8aa7091fb54d869228d9ffb61.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: / X-VCS-Repository: proj/R_overlay X-VCS-Files: run_depres.py X-VCS-Directories: / X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 669e6011375710c8aa7091fb54d869228d9ffb61 X-VCS-Branch: master Date: Fri, 29 Jun 2012 22:48:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: d9e423e1-b695-4a71-8a97-43dc90a4200b X-Archives-Hash: 8380a0fb56c8cf25d3a2c25a0d5e46ad commit: 669e6011375710c8aa7091fb54d869228d9ffb61 Author: Andr=C3=A9 Erdmann mailerd de> AuthorDate: Fri Jun 29 22:46:04 2012 +0000 Commit: Andr=C3=A9 Erdmann mailerd de> CommitDate: Fri Jun 29 22:46:04 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/R_overlay.git= ;a=3Dcommit;h=3D669e6011 test script: run_depres.py Usage: ./run_depres.py or ./run_depres.py This tries to resolve the dependencies read from argv or a file. new file: run_depres.py --- run_depres.py | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/run_depres.py b/run_depres.py new file mode 100755 index 0000000..015d0e9 --- /dev/null +++ b/run_depres.py @@ -0,0 +1,32 @@ +#!/usr/bin/python3 + +import sys +import os.path + +if len ( sys.argv ) < 2: + print ( "Usage: %s " % sys.argv[0] ) + exit ( 10 ) + +if os.path.isfile ( sys.argv[1] ): + print ( "reading a file" ) + with open ( sys.argv[1], 'r' ) as fh: + deps =3D tuple ( x.strip() for x in filter ( None, fh.readlines() ) ) +else: + deps =3D sys.argv[1:] + + +from roverlay.recipe.easyresolver import setup as getres +from roverlay.depres.channels import EbuildJobChannel + + +R =3D getres() +c =3D EbuildJobChannel ( name=3D'chantest' ) +R.register_channel ( c ) +c.add_dependencies ( deps ) + + +if c.satisfy_request(): + print ( "Success!" ) + print ( str ( c.collect_dependencies() ) ) +else: + print ( "" )