[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help with debian/control Depends: for php4 and php5



On Fri, Apr 14, 2006 at 02:31:54PM -0400, Kevin Coyner wrote:
> Now I'd like to make it depend on either php4 or php5, so I've
> attempted the following:
> 
> Depends: ${misc:Depends}, php4 (>=4.3) | php5 (>=5.1) |
> libapache2-mod-php4 | libapache2-mod-php5, php4-mysql (>=4 .3) |

I think you're over-complicating things here (and introducing a couple of
bugs, to boot).  The php4 and php5 packages are both meta-packages these
days, depending on all of the available flavours of PHP interpreter out
there (for that particular major version of PHP).  Hence, it isn't necessary
for you to specify either of the libapache2-mod-php? packages in the depends
line, because the php4 | php5 dependency will pick up a PHP interpreter for
you.

Now, as to the bugs.  Firstly, you've specified minimum required versions of
php4 and php5 (presumably because your package really needs those minimum
versions) but you haven't carried that version requirement through to the
apache2 modules.  This means that I could install
libapache-mod-php5_5.0.5-2, which would satisfy the dependency as a whole,
but not have the minimum required version of PHP 5 (if the version on the
php5 package is correct).

Secondly, the version you've specified for the php4 and php4-mysql packages
is incorrect.  The php4 packages have an epoch on them, which means that
the correct version spec for them is ">= 4:4.3".

Also, I don't think I'd bother putting a versioned dep on php4-mysql -- it's
unlikely that you need features that are only available in the 4.3+ versions
of that package, so all you want is a version of php4-mysql which is
compatible with the version of the PHP 4 interpreter that you're installing. 
That requirement will, of course, be settled by the dependencies in the
php4-mysql and PHP interpreter package, so there's no need to specify the
versioned dependency unless you have a real need for features in the
php4-mysql package only present in the given version.

- Matt



Reply to: