From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29261 invoked by uid 1002); 19 Aug 2003 06:27:40 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 23893 invoked from network); 19 Aug 2003 06:27:39 -0000 Date: Tue, 19 Aug 2003 15:25:25 +0900 Message-ID: <86ekziqi3u.wl%usata@gentoo.org> From: Mamoru KOMACHI To: gentoo-dev@gentoo.org In-Reply-To: <20030819044350.07c7c89e.spider@gentoo.org> References: <20030819023147.GA24048@force.stwing.upenn.edu> <20030819044350.07c7c89e.spider@gentoo.org> User-Agent: Wanderlust/2.11.7 (Wonderwall) SEMI/1.14.5 (Awara-Onsen) LIMIT/1.14.7 (Fujiidera) APEL/10.6 Emacs/21.3 (i686-gentoo-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Subject: Re: [gentoo-dev] how to determine if a virtual is installed, from the shell? X-Archives-Salt: 4f7fd085-4972-475c-90e3-c187e16f99e0 X-Archives-Hash: 4989ddd4c4835e31d8e1883838fe3531 At Tue, 19 Aug 2003 04:43:50 +0200, Spider wrote: > > [1 ] > begin quote > On Mon, 18 Aug 2003 22:31:47 -0400 > Owen Gunden 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 http://dev.gentoo.org/~usata/ -- gentoo-dev@gentoo.org mailing list