Mail archive

[alpine-devel] apk-tools/dependencies question for php

From: Natanael Copa <>
Date: Thu, 11 Feb 2010 16:03:37 +0100

So we have this package, php, which raises interesting questions about

we have 'php-cli', 'php' (php-cgi) and various php modules. Lets use
php-gd as an example.

php-imap does not make sense as a standalone, its just a .so file, so
it made sense to have 'php' as a dependency. You installed php-gd, it
pulled in php for you.

Now that we have php-cli in addition to php (cgi), and you can run
either of those with php-imap we can no longer pull in 'php' as
dependency since you might want to run the php-cli and not the cgi.

so how do we deal with that?

I can see those options:

1. remove the php dependency from php-dg (and all other php modules)
and let user handle the deps himself
2. implement optional/volunteer dependencies in apk-tools. You can as
user do something to tell apk that we want php-gd to be a dependency
for php when you install php, so when php is removed php-gd goes out
as well.
3. some other way to snap in dependencies manually afterwards. Like:
 # install php-gd and php-imap as dependencies for php
 apk add -d php php-gd php-imap
4. implement 'or' in apk-tools and let php-gd depend on either 'php or php-cli'

For now i think we will go for option 1, but it would be nice to hear
what you think would be the optimal solution for this situation.


Natanael Copa
Received on Thu Feb 11 2010 - 16:03:37 UTC