public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mamoru KOMACHI <usata@gentoo.org>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] how to determine if a virtual is installed, from the shell?
Date: Tue, 19 Aug 2003 15:25:25 +0900	[thread overview]
Message-ID: <86ekziqi3u.wl%usata@gentoo.org> (raw)
In-Reply-To: <20030819044350.07c7c89e.spider@gentoo.org>

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 <ogunden@stwing.upenn.edu> 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 <usata@gentoo.org>
http://dev.gentoo.org/~usata/

--
gentoo-dev@gentoo.org mailing list


      parent reply	other threads:[~2003-08-19  6:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-19  2:31 [gentoo-dev] how to determine if a virtual is installed, from the shell? Owen Gunden
2003-08-19  2:43 ` Spider
2003-08-19  2:49   ` Owen Gunden
2003-08-19  6:25   ` Mamoru KOMACHI [this message]

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=86ekziqi3u.wl%usata@gentoo.org \
    --to=usata@gentoo.org \
    --cc=gentoo-dev@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