4 3

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

Natanael Copa
Details
Message ID
<95408c821002110703u72a33179w43df88d1902c9fc@mail.gmail.com>
Sender timestamp
1265900617
DKIM signature
missing
Download raw message
So we have this package, php, which raises interesting questions about
dependencies.

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.

Thanks!

-- 
Natanael Copa


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Cameron Banta
Details
Message ID
<531b02ea1002111413k10d4decfl58acd052184a7be6@mail.gmail.com>
In-Reply-To
<95408c821002110703u72a33179w43df88d1902c9fc@mail.gmail.com> (view parent)
Sender timestamp
1265926435
DKIM signature
missing
Download raw message
On Thu, Feb 11, 2010 at 9:03 AM, Natanael Copa <natanael.copa@gmail.com>wrote:

> So we have this package, php, which raises interesting questions about
> dependencies.
>
> 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.
>
>
Another option similar to 4 - could we do some kind of provides? Kind of
like openrc does.

So php-cli would provide php. So if you installed php-gd, it would install
php as dependency. But if you installed php-cli first, then php-gd wouldn't
install anything extra because it would think php was already installed.

-Cameron
Carlo Landmeter
Details
Message ID
<1b2623ac1002111330s3762a4f8ucda0242206ad2634@mail.gmail.com>
In-Reply-To
<95408c821002110703u72a33179w43df88d1902c9fc@mail.gmail.com> (view parent)
Sender timestamp
1265923817
DKIM signature
missing
Download raw message
Hi,

PHP is mainly used as a web scripting language right? I guess apk
should focus on PHP cgi instead of php-cli.
Lets say you install php-gd it will first look if php is installed, if
not then it will install php cgi and display a message about the other
options PHP which could have been installed (php-cli). If the users
would like cli he could install it afterwards and then remove php-cgi.
If php-cli would have been installed already it would ignore php-cgi.
I guess this way is similar then your #4? I guess making apk
interactive to choose your preferred php version is not
possible/suitable?

-carlo


On Thu, Feb 11, 2010 at 4:03 PM, Natanael Copa <natanael.copa@gmail.com> wrote:
> So we have this package, php, which raises interesting questions about
> dependencies.
>
> 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.
>
> Thanks!
>
> --
> Natanael Copa
>
>
> ---
> Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
> Help:         alpine-devel+help@lists.alpinelinux.org
> ---
>
>


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<95408c821002120708k68e9e7f8xf902e0da6b1805e1@mail.gmail.com>
In-Reply-To
<531b02ea1002111413k10d4decfl58acd052184a7be6@mail.gmail.com> (view parent)
Sender timestamp
1265987326
DKIM signature
missing
Download raw message
On Thu, Feb 11, 2010 at 11:13 PM, Cameron Banta <cbanta@gmail.com> wrote:
> On Thu, Feb 11, 2010 at 9:03 AM, Natanael Copa <natanael.copa@gmail.com>
> wrote:
...
>> 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.
>>
>
> Another option similar to 4 - could we do some kind of provides? Kind of
> like openrc does.
> So php-cli would provide php. So if you installed php-gd, it would install
> php as dependency. But if you installed php-cli first, then php-gd wouldn't
> install anything extra because it would think php was already installed.

Yeah, i think this is what we want, "provides" functionallity.

Thanks!

-- 
Natanael Copa


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<95408c821002120711g537943b1xe9843162ae95449e@mail.gmail.com>
In-Reply-To
<1b2623ac1002111330s3762a4f8ucda0242206ad2634@mail.gmail.com> (view parent)
Sender timestamp
1265987491
DKIM signature
missing
Download raw message
On Thu, Feb 11, 2010 at 10:30 PM, Carlo Landmeter <clandmeter@gmail.com> wrote:
> Hi,
>
> PHP is mainly used as a web scripting language right? I guess apk
> should focus on PHP cgi instead of php-cli.

This was more a general question how to deal with this kind of dependencies.
 php-cgi.

> I guess this way is similar then your #4?

We want "provides" functionallity.

> I guess making apk interactive to choose your preferred php version is not
> possible/suitable?

Must not be interactive by default. you have -i option for interactivity though.

Thanks for input!

-- 
Natanael Copa


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---