Re: [gentoo-dev] PKG-INFO (Was: PMS EAPI 3 more or less ready)

2009-04-23 Thread Brian Harring
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 betelge...@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?

~harring


pgpu1i5oyg6OD.pgp
Description: PGP signature


Re: [gentoo-dev] PKG-INFO (Was: PMS EAPI 3 more or less ready)

2009-04-23 Thread Ciaran McCreesh
On Thu, 23 Apr 2009 01:29:11 -0700
Brian Harring ferri...@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 betelge...@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
Description: PGP signature


Re: [gentoo-dev] PKG-INFO (Was: PMS EAPI 3 more or less ready)

2009-04-22 Thread Petteri Räty
Ciaran McCreesh wrote:
 Still trying to stick to one subthread per item here.
 
 On Tue, 21 Apr 2009 04:27:41 +0300
 Petteri Räty betelge...@gentoo.org wrote:
 * PKG-INFO
 query. I have probably missed what's the use case for non installed
 packages?
 
 For some packages, when a bug report for a failed build is submitted,
 there are a load of standard questions (versions of libraries that
 aren't in the usual info_pkgs list, configuration questions, ...) that
 need to be asked. This is a way of automating it.
 

Ok. So people should then be using has_version in pkg_info if they want
to detect if it's installed or not?

Regards,
Petteri



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] PKG-INFO (Was: PMS EAPI 3 more or less ready)

2009-04-22 Thread Ciaran McCreesh
On Wed, 22 Apr 2009 16:56:08 +0300
Petteri Räty betelge...@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.

Generally pkg_info should just try to display as much useful
information as it can, though. In particular, it shouldn't do things
like if we're installed, don't display this information, since people
might be having trouble with a reinstall.

-- 
Ciaran McCreesh


signature.asc
Description: PGP signature


Re: [gentoo-dev] PKG-INFO (Was: PMS EAPI 3 more or less ready)

2009-04-21 Thread Ciaran McCreesh
Still trying to stick to one subthread per item here.

On Tue, 21 Apr 2009 04:27:41 +0300
Petteri Räty betelge...@gentoo.org wrote:
  * PKG-INFO
 
 query. I have probably missed what's the use case for non installed
 packages?

For some packages, when a bug report for a failed build is submitted,
there are a load of standard questions (versions of libraries that
aren't in the usual info_pkgs list, configuration questions, ...) that
need to be asked. This is a way of automating it.

-- 
Ciaran McCreesh


signature.asc
Description: PGP signature