public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] ebuild optional dependencies question
@ 2004-10-18 17:16 Jason Rhinelander
  2004-10-18 20:19 ` Ciaran McCreesh
  2004-10-21 10:20 ` Michael Cummings
  0 siblings, 2 replies; 5+ messages in thread
From: Jason Rhinelander @ 2004-10-18 17:16 UTC (permalink / raw
  To: gentoo-dev

I've recently created a MySQL-4.1.x ebuild (bug 62582), but, as reported 
in the bug, it breaks a couple modules (notably, Perl's DBD-mysql and 
ruby's mysql module).  Realistically, the pseudo-dependency for this 
package needs to be something like:

if DBD-mysql is installed:
     post-depend on DBD-mysql >= 2.9004
if ruby's mysql module is installed
     post-depend on mysql-ruby >= 2.5

Putting both in PDEPEND would seem wrong as it forces both on people who 
might use only one or neither.  The following ought to more-or-less 
accomplish it:

PDEPEND="perl? ( >=dev-perl/DBD-mysql )
	ruby? ( >=dev-ruby/mysql-ruby-2.5 )"

The current mysql ebuild does this for "perl" (it also includes an 
unnecessary dev-perl/DBI dependency).  However, I've seen comments in 
the past that give me the impression that using USE flags ONLY for 
dependencies, such as the 'ruby' flag above, is discouraged (the 'perl' 
USE flag is also used elsewhere in the ebuild).

Is there an alternative, established way of dealing with a situation 
like this, or is the PDEPEND USE-flags above the best way?

-- 
-- Jason Rhinelander
-- Gossamer Threads, Inc.

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] ebuild optional dependencies question
  2004-10-18 17:16 [gentoo-dev] ebuild optional dependencies question Jason Rhinelander
@ 2004-10-18 20:19 ` Ciaran McCreesh
  2004-10-18 21:38   ` Jason Rhinelander
  2004-10-21 10:20 ` Michael Cummings
  1 sibling, 1 reply; 5+ messages in thread
From: Ciaran McCreesh @ 2004-10-18 20:19 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]

On Mon, 18 Oct 2004 10:16:49 -0700 Jason Rhinelander
<jason@gossamer-threads.com> wrote:
| I've recently created a MySQL-4.1.x ebuild (bug 62582), but, as
| reported in the bug, it breaks a couple modules (notably, Perl's
| DBD-mysql and ruby's mysql module).

Can't you solve this with blocking versions?

-- 
Ciaran McCreesh : Gentoo Developer (Vim, Fluxbox, Sparc, Mips)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] ebuild optional dependencies question
  2004-10-18 20:19 ` Ciaran McCreesh
@ 2004-10-18 21:38   ` Jason Rhinelander
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Rhinelander @ 2004-10-18 21:38 UTC (permalink / raw
  To: gentoo-dev

Ciaran McCreesh wrote:

 > Can't you solve this with blocking versions?

I don't see how - I made a (fictitious) DBD-mysql-2.9005 ebuild (I 
currently have 2.9004), and tried changing my mysql ebuild to:

PDEPEND="!<dev-perl/DBD-mysql-2.9005"

But that neither pulled in 2.9005 nor blocked the emerge.  I tried 
throwing it into RDEPEND, which (expectedly) blocks the emerge entirely 
- but emerging DBD-mysql /before/ mysql won't work, and the whole thing 
is wrong anyway because DBD-mysql is in no way a run-time dependency or 
blocker of mysql.

I suppose a specific version requirement could be added to DBD-mysql, 
but this wouldn't be "correct" either as the newer DBD-mysql does *not* 
require a newer mysql.  Alternatively, every ebuild <2.9004 could block 
 >=mysql-4.1 - but that is quite a bit more maintenance to solve this 
problem.

I did notice after I sent earlier e-mail that the mysql-4.0.21 ebuild 
uses the selinux USE flag only in RDEPEND, so I concluded that USE-flags 
that exist only in DEPEND's are a somewhat necessary evil and added a 
"ruby? (...)" to PDEPEND.

That said, USE=ruby has *no* impact on how MySQL is built, and as such 
also seems "wrong" - and I wonder how many other, similar cases exist. 
However, having portage upgrade my DBD-mysql when I emerge mysql would 
be a very nice feature, and keep a blocker from happening - which is 
never a nice thing.

To that end, I wonder if it might be useful to expand the var?, !var?, 
etc. syntax in DEPEND's to allow not just use-flags for 'var', but also 
package atoms, allowing for syntax such as:

cat-a/package? ( >=cat-a/package-1.2 )
=cat-b/packb-1*? ( >=cat-b/packb-1.2 )
 >=cat-b/packb-2? ( >=cat-b/packb-2.4 )

Currently this is invalid, but it would appear to be an elegant solution 
to this problem, and wouldn't appear to break anything (aside from old 
portage versions).

-- Jason Rhinelander
-- Gossamer Threads, Inc.

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] ebuild optional dependencies question
  2004-10-18 17:16 [gentoo-dev] ebuild optional dependencies question Jason Rhinelander
  2004-10-18 20:19 ` Ciaran McCreesh
@ 2004-10-21 10:20 ` Michael Cummings
  2004-10-21 19:24   ` Jason Rhinelander
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Cummings @ 2004-10-21 10:20 UTC (permalink / raw
  To: Jason Rhinelander; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

Jason,

On Mon, Oct 18, 2004 at 10:16:49AM -0700, Jason Rhinelander wrote:
> The current mysql ebuild does this for "perl" (it also includes an 
> unnecessary dev-perl/DBI dependency).  However, I've seen comments in 

Slightly OT, but this isn't "unnecessary"

  $o{'PREREQ_PM'} = { 'DBI' => 1.08,

  DBI is a dep of dbd::mysql - it provides the core portion of the db
  interface for perl that dbd::mysql builds on top of.

  Come on, had to make a comment :)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] ebuild optional dependencies question
  2004-10-21 10:20 ` Michael Cummings
@ 2004-10-21 19:24   ` Jason Rhinelander
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Rhinelander @ 2004-10-21 19:24 UTC (permalink / raw
  To: Michael Cummings; +Cc: gentoo-dev

Michael Cummings wrote:
>>The current mysql ebuild does this for "perl" (it also includes an 
>>unnecessary dev-perl/DBI dependency).  However, I've seen comments in 
> 
> Slightly OT, but this isn't "unnecessary"
> 
>   $o{'PREREQ_PM'} = { 'DBI' => 1.08,

I didn't mean DBI is unnecessary, but merely that DBI is a dependency of 
DBD-mysql, and so should be (and is) in DBD-mysql's DEPEND.  It doesn't, 
however, have anything to do with mysql and as such doesn't make a whole 
lot of sense in the mysql ebuild.  That said, it really doesn't make a 
difference either way since it'll be pulled in regardless.

-- Jason Rhinelander
-- Gossamer Threads, Inc.

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-21 19:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-18 17:16 [gentoo-dev] ebuild optional dependencies question Jason Rhinelander
2004-10-18 20:19 ` Ciaran McCreesh
2004-10-18 21:38   ` Jason Rhinelander
2004-10-21 10:20 ` Michael Cummings
2004-10-21 19:24   ` Jason Rhinelander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox