Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Marius Mauch
On Thu, 22 Jan 2004 16:14:19 + Ciaran McCreesh <[EMAIL PROTECTED]> wrote: > On Fri, 23 Jan 2004 00:58:36 +0900 Jason Stubbs > <[EMAIL PROTECTED]> wrote: > | > qpkg -I | grep package_name > | > | I don't have qpkg or any of that installed so I can't check, but > isn't| qpkg written in python?

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Jeremy Maitin-Shepard
portageq -- Jeremy Maitin-Shepard -- [EMAIL PROTECTED] mailing list

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Stroller
On Jan 22, 2004, at 12:51 pm, [EMAIL PROTECTED] wrote: What is the quickest (or preferred) way of checking (in a bash script) if a given package is installed? I think the most elegant way MIGHT be to import functions from Portage / ebuild, and use DEPENDS (see `man ebuild` and `man 5 ebuild`) but

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Ciaran McCreesh
On Fri, 23 Jan 2004 00:58:36 +0900 Jason Stubbs <[EMAIL PROTECTED]> wrote: | > qpkg -I | grep package_name | | I don't have qpkg or any of that installed so I can't check, but isn't | qpkg written in python? If so, that method would be somewhat slower. Yes, but it doesn't rely upon the underlying

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread David Gethings
On Thu, 2004-01-22 at 15:58, Jason Stubbs wrote: > I don't have qpkg or any of that installed so I can't check, but isn't qpkg > written in python? If so, that method would be somewhat slower. No it is a bash script. And no just because it is written in python doesn't mean it is inherently slower

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Jason Stubbs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 22 January 2004 23:51, Mark Knecht wrote: > > > What is the quickest (or preferred) way of checking (in a > > > bash script) if a given package is installed? > > > > I don't know if it would be the preferred way, but I think the > > quickes

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread gabriel
On January 22, 2004 09:36 am, Jason Stubbs wrote: > > What is the quickest (or preferred) way of checking (in a > > bash script) if a given package is installed? > > I don't know if it would be the preferred way, but I think the quickest > would be: > > PKG="sys-apps/portage" > [ -e /var/db/pkg/${P

RE: [gentoo-user] Check if a package is installed

2004-01-22 Thread Mark Knecht
> > What is the quickest (or preferred) way of checking (in a > > bash script) if a given package is installed? > > I don't know if it would be the preferred way, but I think the > quickest would > be: > > PKG="sys-apps/portage" > [ -e /var/db/pkg/${PKG}-* ] > or: qpkg -I | grep package_name

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Jason Stubbs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 22 January 2004 21:51, [EMAIL PROTECTED] wrote: > Hi. > > What is the quickest (or preferred) way of checking (in a > bash script) if a given package is installed? I don't know if it would be the preferred way, but I think the quickest wou

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Barry Marler
On 22 Jan 2004 13:06:35 + "Neil Bothwick" <[EMAIL PROTECTED]> wrote: > Barry Marler said, > > >> What is the quickest (or preferred) way of checking (in a > >> bash script) if a given package is installed? > > > 2. qpkg -I > > qpkg returns zero whether the package is installed or not. >

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Neil Bothwick
Barry Marler said, >> What is the quickest (or preferred) way of checking (in a >> bash script) if a given package is installed? > 2. qpkg -I qpkg returns zero whether the package is installed or not. You could use something like if [ `qpkg -I packagename | wc -l` -gt 0 ]; then e

Re: [gentoo-user] Check if a package is installed

2004-01-22 Thread Barry Marler
On Thu, 22 Jan 2004 10:51:52 -0200 [EMAIL PROTECTED] wrote: > Hi. > > What is the quickest (or preferred) way of checking (in a > bash script) if a given package is installed? 1. emerge gentoolkit 2. qpkg -I -- Barry Marler Information Analyst II Center for Applied Genetic Technologies Univer