Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] PKG-INFO (Was: PMS EAPI 3 more or less ready)
Date: Thu, 23 Apr 2009 12:42:14
Message-Id: 20090423134205.31e86a1f@snowcone
In Reply to: Re: [gentoo-dev] PKG-INFO (Was: PMS EAPI 3 more or less ready) by Brian Harring
1 On Thu, 23 Apr 2009 01:29:11 -0700
2 Brian Harring <ferringb@×××××.com> wrote:
3 > On Wed, Apr 22, 2009 at 02:57:34PM +0100, Ciaran McCreesh wrote:
4 > > On Wed, 22 Apr 2009 16:56:08 +0300
5 > > Petteri Räty <betelgeuse@g.o> wrote:
6 > > > Ok. So people should then be using has_version in pkg_info if they
7 > > > want to detect if it's installed or not?
8 > >
9 > > If they absolutely totally need to detect that, then yes.
10 >
11 > Presuming I read that correctly, invoking has_version w/in pkg x to
12 > see if pkg x is installed seems like redundant code (and slightly
13 > circuitious from a PM standpoint)- why not just export a bool into
14 > the env for pkg_info indicating if it is installed or not?
15
16 Because you might want to check that foo is installed from within foo,
17 or you might want to check that foo-2 is installed from within foo-2,
18 or you might want to check something subtly different -- and that's
19 before we start thinking about slots. It's not really a bool thing, so
20 has_version is the simplest way for people who need to detect a
21 particular thing to detect it.
22
23 --
24 Ciaran McCreesh

Attachments

File name MIME type
signature.asc application/pgp-signature