public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Using some of the emerge features in external programs
@ 2004-09-25 20:32 Abraham Marin Perez
  2004-09-25 20:36 ` Jon Portnoy
  2004-09-26  4:32 ` Mike Frysinger
  0 siblings, 2 replies; 3+ messages in thread
From: Abraham Marin Perez @ 2004-09-25 20:32 UTC (permalink / raw
  To: gentoo-dev

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.

    The application I want to do is actually just a script to clean
distfiles directory, but I'd like it to keep files that'd be used if we
install their programs and delete those files that wouldn't be used
anyway.

Abraham.

************************************************************************
Abraham Marin Perez
Studying Computers Science in University of Valencia
E-mail: abraham@alumni.uv.es
Home page: http://mural.uv.es/abraham

Leela: "Bender, maybe you can interface with the Femputer and reprogram
it to let them go." Bender: "Maybe you can interface with my ass... by
biting it."
************************************************************************


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] Using some of the emerge features in external programs
  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
  2004-09-26  4:32 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Jon Portnoy @ 2004-09-25 20:36 UTC (permalink / raw
  To: Abraham Marin Perez; +Cc: gentoo-dev

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] Using some of the emerge features in external programs
  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
@ 2004-09-26  4:32 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2004-09-26  4:32 UTC (permalink / raw
  To: gentoo-dev

On Saturday 25 September 2004 04:32 pm, Abraham Marin Perez wrote:
>     The application I want to do is actually just a script to clean
> distfiles directory

search bugzilla, there's already a few out there
-mike

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-26  4:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2004-09-26  4:32 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox