From: Jon Portnoy <avenj@gentoo.org>
To: Abraham Marin Perez <abraham@alumni.uv.es>
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Using some of the emerge features in external programs
Date: Sat, 25 Sep 2004 16:36:01 -0400 [thread overview]
Message-ID: <20040925203601.GA21746@cerberus.oppresses.us> (raw)
In-Reply-To: <1096144355.13217.12.camel@localhost>
On Sat, Sep 25, 2004 at 10:32:36PM +0200, Abraham Marin Perez wrote:
> Hi everyone,
>
> Firstly I want to say hello since this is the first e-mail I send to
> this mailing list. The second and maybe the most important point is that
> I'd like to use one of the features of emerge, and that is a way to know
> the version of an application that'd be emerged given the name of the
> application or, yet better, the complete name(s) of the file(s) that'd
> be downloaded to emerge that application.
You can access Portage's python library. For example, from the master
repository distfiles cleaning script (no idea if it's still in use or
not, I'm not involved with distfiles infrastructure anymore):
URI=`python -c 'import portage; print portage.db["/"]["porttree"].dbapi.aux_get('\"$CATPKG\"',["SRC_URI"])[0]'`
grabbed the Portage-parsed SRC_URI for foo-bar/xyz in $CATPKG.
You can then use basename or whatever your preferred method is for
parsing out the filenames.
--
Jon Portnoy
avenj/irc.freenode.net
--
gentoo-dev@gentoo.org mailing list
next prev parent reply other threads:[~2004-09-25 20:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-25 20:32 [gentoo-dev] Using some of the emerge features in external programs Abraham Marin Perez
2004-09-25 20:36 ` Jon Portnoy [this message]
2004-09-26 4:32 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040925203601.GA21746@cerberus.oppresses.us \
--to=avenj@gentoo.org \
--cc=abraham@alumni.uv.es \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox