~alpine/devel

5 2

[alpine-devel] The install_if feature in apk-tools

Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20110104094133.1b4895c5@ncopa-desktop.nor.wtbts.net>
Sender timestamp
1294130493
DKIM signature
missing
Download raw message
Hi,

We are implementing a feature that we call "install_if" which will make
it possible to do proper language subpackages.

If we take squid as example, you have squid main application and a
subpackage with error messages. In the subpackage squid-lang-se you
have:

install_if="squid=$pkgver lang-se"

this means if you have squid installed (or pulled in as dependency) and
have added the 'lang-se' virtual package, you will automatically get
squid-lang-se pulled in.

In other words, you can do: 'apk add lang-se' and all packages that has
support for swedish language/locale will be pulled in.

This is alos useful for kernel flavours and 3rd party drivers.
Forexample, dahadi-linux-grsec could have:

install_if="linux-grsec=$_kernelver dahdi"

so if you install dahdi and have linux-grsec installed, then will the
dahdi-linux-grsec package be pulled in too. If you replace the
linux-grsec with linux-vserver then will also the kernel driver be
replaced with the proper driver package for that kernel.

Now I have a couple of questions:

* 1 language packs. Some packages has pretty many different locales.
  For example gtk+ has 107 different. I wonder if we should group them
  some how to keep number of packages down. Ideas on how to group the
  sanely? Or we accept that we suddenly get 1 zillion language packages?

* Do we want use-flags like features for things like mysql, radius etc?
  For example, if you install a virtual 'mysql-support' package, then
  will all packages that has a mysql plug automatically pull those in?
  For example, i you install php you'll get php-mysql pulled in. If you
  install asterisk and postfix will also asterisk-mysql and
  postfix-mysql be pulled in. If you uninstall the virtual
  'mysql-support' then will php-mysql, asterisk-mysql and postfix-mysql
  go with it. I am not sure how useful such 'mysql-support' feature
  will be.

Thoughts?




---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<1294472305.36599267@192.168.4.58>
In-Reply-To
<20110104094133.1b4895c5@ncopa-desktop.nor.wtbts.net> (view parent)
Sender timestamp
1294472305
DKIM signature
missing
Download raw message
On Tuesday, January 4, 2011 2:41am, "Natanael Copa" <ncopa@alpinelinux.org>
said:

..snip..
> * Do we want use-flags like features for things like mysql, radius etc?
>   For example, if you install a virtual 'mysql-support' package, then
>   will all packages that has a mysql plug automatically pull those in?
>   For example, i you install php you'll get php-mysql pulled in. If you
>   install asterisk and postfix will also asterisk-mysql and
>   postfix-mysql be pulled in. If you uninstall the virtual
>   'mysql-support' then will php-mysql, asterisk-mysql and postfix-mysql
>   go with it. I am not sure how useful such 'mysql-support' feature
>   will be.
> 
> Thoughts?

IMHO, use-flags was just another one of those features that scared me
away from using Gentoo Linux.

For instance, this is just horrifying:
http://www.gentoo.org/dyn/use-index.xml

On one hand, I think use-flags could be a great thing, but on the other,
I just don't want to see it get out of hand, or be forced on the user in
order to use the system.  I think if those 'rules' could be followed, then
we could enjoy use-flags.

Matt



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<1294476084.615548@192.168.4.58>
In-Reply-To
<4D281F33.1030805@iki.fi> (view parent)
Sender timestamp
1294476084
DKIM signature
missing
Download raw message
On Saturday, January 8, 2011 2:24am, "Timo Teräs" <timo.teras@iki.fi> said:
> On 01/08/2011 09:38 AM, Matt Smith wrote:
>> IMHO, use-flags was just another one of those features that scared me
>> away from using Gentoo Linux.
>>
>> For instance, this is just horrifying:
>> http://www.gentoo.org/dyn/use-index.xml
> 
> Yes, that's a horribly long list to go through.
> 
>> On one hand, I think use-flags could be a great thing, but on the other,
>> I just don't want to see it get out of hand, or be forced on the user in
>> order to use the system.  I think if those 'rules' could be followed, then
>> we could enjoy use-flags.
> 
> The idea on install_if is that it's completely optional. You can always
> install your packages on per-package basis, and you never need to
> install the virtual targets.
> 
> However, install_if gives you a great help, if you just want some
> feature X to work. Like "make all programs localized to Norwegian". It'd
> be single command: "apk add lang-no" instead of going through all the
> packages having Norwegian support and installing the them one by one.

Sounds fair.

On the language packs, would you be leaning more towards virtual packages
or some sort of use-flags?

Other than that, what do you think about using use-flags for installing the
software packages?

Matt



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<1294477014.482812241@192.168.4.58>
In-Reply-To
<4D282450.2010703@iki.fi> (view parent)
Sender timestamp
1294477014
DKIM signature
missing
Download raw message
On Saturday, January 8, 2011 2:46am, "Timo Teräs" <timo.teras@iki.fi> said:
> On 01/08/2011 10:41 AM, Matt Smith wrote:
>> On Saturday, January 8, 2011 2:24am, "Timo Teräs" <timo.teras@iki.fi> said:
>>> On 01/08/2011 09:38 AM, Matt Smith wrote:
>>>> On one hand, I think use-flags could be a great thing, but on the other,
>>>> I just don't want to see it get out of hand, or be forced on the user in
>>>> order to use the system.  I think if those 'rules' could be followed, then
>>>> we could enjoy use-flags.
>>>
>>> The idea on install_if is that it's completely optional. You can always
>>> install your packages on per-package basis, and you never need to
>>> install the virtual targets.
>>>
>>> However, install_if gives you a great help, if you just want some
>>> feature X to work. Like "make all programs localized to Norwegian". It'd
>>> be single command: "apk add lang-no" instead of going through all the
>>> packages having Norwegian support and installing the them one by one.
>>
>> Sounds fair.
>>
>> On the language packs, would you be leaning more towards virtual packages
>> or some sort of use-flags?
>>
>> Other than that, what do you think about using use-flags for installing the
>> software packages?
> 
> Well. From the apk point of view they are virtual packages. From the
> user point of view, they are more like "use flags". Since if you install
> the virtual master package 'lang-XX' you will get that feature from all
> installed packages.
> 
> I personally think that "apk add lang-XX" is better than "edit file
> /etc/apk/config and add lang-XX to line y". From practical point of
> view, they do the same thing.
> 
> From APKBUILD point of view, they are more like use flags. You just need
> to split the package for each "use flag" properly.
> 
> I don't mind if we call them as "virtual targets" or "use flags" as long
> as they are easy to install :)

That's exactly what I'm thinking: it must be easy to install.

I'm totally on-board for 'virtual packages'.

Matt



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Timo Teräs <timo.teras@iki.fi>
Details
Message ID
<4D281F33.1030805@iki.fi>
In-Reply-To
<1294472305.36599267@192.168.4.58> (view parent)
Sender timestamp
1294475059
DKIM signature
missing
Download raw message
On 01/08/2011 09:38 AM, Matt Smith wrote:
> On Tuesday, January 4, 2011 2:41am, "Natanael Copa" <ncopa@alpinelinux.org>
> said:
> 
> ..snip..
>> * Do we want use-flags like features for things like mysql, radius etc?
>>   For example, if you install a virtual 'mysql-support' package, then
>>   will all packages that has a mysql plug automatically pull those in?
>>   For example, i you install php you'll get php-mysql pulled in. If you
>>   install asterisk and postfix will also asterisk-mysql and
>>   postfix-mysql be pulled in. If you uninstall the virtual
>>   'mysql-support' then will php-mysql, asterisk-mysql and postfix-mysql
>>   go with it. I am not sure how useful such 'mysql-support' feature
>>   will be.
>>
>> Thoughts?
> 
> IMHO, use-flags was just another one of those features that scared me
> away from using Gentoo Linux.
> 
> For instance, this is just horrifying:
> http://www.gentoo.org/dyn/use-index.xml

Yes, that's a horribly long list to go through.

> On one hand, I think use-flags could be a great thing, but on the other,
> I just don't want to see it get out of hand, or be forced on the user in
> order to use the system.  I think if those 'rules' could be followed, then
> we could enjoy use-flags.

The idea on install_if is that it's completely optional. You can always
install your packages on per-package basis, and you never need to
install the virtual targets.

However, install_if gives you a great help, if you just want some
feature X to work. Like "make all programs localized to Norwegian". It'd
be single command: "apk add lang-no" instead of going through all the
packages having Norwegian support and installing the them one by one.


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Timo Teräs <timo.teras@iki.fi>
Details
Message ID
<4D282450.2010703@iki.fi>
In-Reply-To
<1294476084.615548@192.168.4.58> (view parent)
Sender timestamp
1294476368
DKIM signature
missing
Download raw message
On 01/08/2011 10:41 AM, Matt Smith wrote:
> On Saturday, January 8, 2011 2:24am, "Timo Teräs" <timo.teras@iki.fi> said:
>> On 01/08/2011 09:38 AM, Matt Smith wrote:
>>> On one hand, I think use-flags could be a great thing, but on the other,
>>> I just don't want to see it get out of hand, or be forced on the user in
>>> order to use the system.  I think if those 'rules' could be followed, then
>>> we could enjoy use-flags.
>>
>> The idea on install_if is that it's completely optional. You can always
>> install your packages on per-package basis, and you never need to
>> install the virtual targets.
>>
>> However, install_if gives you a great help, if you just want some
>> feature X to work. Like "make all programs localized to Norwegian". It'd
>> be single command: "apk add lang-no" instead of going through all the
>> packages having Norwegian support and installing the them one by one.
> 
> Sounds fair.
> 
> On the language packs, would you be leaning more towards virtual packages
> or some sort of use-flags?
> 
> Other than that, what do you think about using use-flags for installing the
> software packages?

Well. From the apk point of view they are virtual packages. From the
user point of view, they are more like "use flags". Since if you install
the virtual master package 'lang-XX' you will get that feature from all
installed packages.

I personally think that "apk add lang-XX" is better than "edit file
/etc/apk/config and add lang-XX to line y". From practical point of
view, they do the same thing.

>From APKBUILD point of view, they are more like use flags. You just need
to split the package for each "use flag" properly.

I don't mind if we call them as "virtual targets" or "use flags" as long
as they are easy to install :)

- Timo


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)