At Tue, 19 Aug 2003 04:43:50 +0200,
Spider wrote:
> 
> [1  <text/plain; US-ASCII (7bit)>]
> begin  quote
> On Mon, 18 Aug 2003 22:31:47 -0400
> Owen Gunden <[EMAIL PROTECTED]> wrote:
> 
> > So hypothetically, if I wanted to write a shell script that behaved
> > differently if virtual/mta was installed than if it was not, what
> > would I do?

> cat /var/cache/edb/virtuals   ...  this should give you the format
> enough to work shell magic with it :)

Alternatively, you can use has_version function.  If you want to use
it from normal shell script (not an ebuild), use

        /usr/bin/portageq has_version / 'virtual/mta' && ...

See man 5 ebuild for more detail.

-- 
Mamoru KOMACHI <[EMAIL PROTECTED]>
http://dev.gentoo.org/~usata/

--
gentoo-dev@gentoo.org mailing list

Reply via email to