[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: Re: [gentoo-dev] PKG-INFO (Was: PMS EAPI 3 more or less ready)
From: Ciaran McCreesh <ciaran.mccreesh () googlemail ! com>
Date: 2009-04-23 12:42:05
Message-ID: 20090423134205.31e86a1f () snowcone
[Download RAW message or body]
On Thu, 23 Apr 2009 01:29:11 -0700
Brian Harring <ferringb@gmail.com> wrote:
> On Wed, Apr 22, 2009 at 02:57:34PM +0100, Ciaran McCreesh wrote:
> > On Wed, 22 Apr 2009 16:56:08 +0300
> > Petteri Räty <betelgeuse@gentoo.org> wrote:
> > > Ok. So people should then be using has_version in pkg_info if they
> > > want to detect if it's installed or not?
> >
> > If they absolutely totally need to detect that, then yes.
>
> Presuming I read that correctly, invoking has_version w/in pkg x to
> see if pkg x is installed seems like redundant code (and slightly
> circuitious from a PM standpoint)- why not just export a bool into
> the env for pkg_info indicating if it is installed or not?
Because you might want to check that foo is installed from within foo,
or you might want to check that foo-2 is installed from within foo-2,
or you might want to check something subtly different -- and that's
before we start thinking about slots. It's not really a bool thing, so
has_version is the simplest way for people who need to detect a
particular thing to detect it.
--
Ciaran McCreesh
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic