public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Better handling of USE flags to enable/disable system libraries
@ 2013-05-28 14:43 David Carlos Manuelda
  2013-05-28 17:53 ` Michał Górny
  0 siblings, 1 reply; 6+ messages in thread
From: David Carlos Manuelda @ 2013-05-28 14:43 UTC (permalink / raw
  To: gentoo-dev

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

I posted a bug about that along with a suggestion, despite sometimes I do not 
explain myself correctly (I am very sorry): bug #471590

Many packages are bundling its own libraries rather than link against system 
ones, and there is a bug tracker for that (bug #251464)

As I saw in many ebuilds, it is fixed by putting a new "system-{$LIBRARY}" 
IUSE in the affected ebuilds to enable/disable linking with external or 
bundled library, but there are plenty of libraries and packages out there to 
pullute the use's config files with several combinations of that USE flags.

What I propose here, is to simplify the process a lot by handling those 
system-{$LIBRARY} USE flags internally with a very simple configuration for 
the user, rather than expose the USE flag directly and forcing user to save 
all combinations for that purpose.

This request/idea is inspired on how the x86_ABI is handled:
As a comparison only, most packages have 32 and 64, and you don't have to 
handle them via USE flag per-package, rather, you have an option in make.conf 
to set it all of them automatically.

What I propose for example, is a very good and simple approach: to have an 
option in portage's make.conf, something like that (the name may change):

1.- USE_SYSTEM_LIBRARIES="cairo sqlite XXX"
2.- USE_SYSTEM_LIBRARIES="* -cairo"
3.- USE_SYSTEM_LIBRARIES="*"

Case explanation:
1.- Will trigger automatically (and enable) USE flags: system-cairo, system-
sqlite and system-XXX
2.- Will trigger all system-* related USE except system-cairo which will be 
disabled
3.- Will trigger all system-* related USE variables with no exception.

I honestly think, it is a best aproach to resolve the library bundling, along 
with a correct fix for affected ebuilds.

What do you think?

Thanks for taking your time to read this suggestion.

David Carlos Manuelda.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries
  2013-05-28 14:43 [gentoo-dev] Better handling of USE flags to enable/disable system libraries David Carlos Manuelda
@ 2013-05-28 17:53 ` Michał Górny
  2013-05-28 18:03   ` Mike Frysinger
  0 siblings, 1 reply; 6+ messages in thread
From: Michał Górny @ 2013-05-28 17:53 UTC (permalink / raw
  To: gentoo-dev; +Cc: stormbyte

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

On Tue, 28 May 2013 16:43:10 +0200
David Carlos Manuelda <stormbyte@gmail.com> wrote:

> I posted a bug about that along with a suggestion, despite sometimes I do not 
> explain myself correctly (I am very sorry): bug #471590
> 
> Many packages are bundling its own libraries rather than link against system 
> ones, and there is a bug tracker for that (bug #251464)
> [...]
> What I propose for example, is a very good and simple approach: to have an 
> option in portage's make.conf, something like that (the name may change):
> 
> 1.- USE_SYSTEM_LIBRARIES="cairo sqlite XXX"
> 2.- USE_SYSTEM_LIBRARIES="* -cairo"
> 3.- USE_SYSTEM_LIBRARIES="*"

I don't think we should do it like this.

Bundling libraries is a pathological case. In general, we should work
on fixing this and getting rid of bundled libraries. In that general
case, the flags are not required.

The remaining cases usually involve libraries that are somehow forked
or otherwise deviated from upstream. For example, the sqlite within
Mozilla products has a few braindead features enabled that are not
really suitable for system-wide use.

In those cases, every library needs to be considered separately
and the concept of local flag matches that. Making it anyhow a global
matter would suggest that each bundled sqlite is equal and each reason
for bundling is exact the same.

That said, I don't see why a user would want to choose to have some
libraries bundled, and others not in a global manner.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

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

* Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries
  2013-05-28 17:53 ` Michał Górny
@ 2013-05-28 18:03   ` Mike Frysinger
  2013-05-28 23:01     ` David Carlos Manuelda
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2013-05-28 18:03 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 967 bytes --]

On Tuesday 28 May 2013 13:53:54 Michał Górny wrote:
> On Tue, 28 May 2013 16:43:10 +0200 David Carlos Manuelda wrote:
> > I posted a bug about that along with a suggestion, despite sometimes I do
> > not explain myself correctly (I am very sorry): bug #471590
> > 
> > Many packages are bundling its own libraries rather than link against
> > system ones, and there is a bug tracker for that (bug #251464)
> > [...]
> > What I propose for example, is a very good and simple approach: to have
> > an option in portage's make.conf, something like that (the name may
> > change):
> > 
> > 1.- USE_SYSTEM_LIBRARIES="cairo sqlite XXX"
> > 2.- USE_SYSTEM_LIBRARIES="* -cairo"
> > 3.- USE_SYSTEM_LIBRARIES="*"
> 
> I don't think we should do it like this.
> 
> Bundling libraries is a pathological case. In general, we should work
> on fixing this and getting rid of bundled libraries. In that general
> case, the flags are not required.

+1
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries
  2013-05-28 18:03   ` Mike Frysinger
@ 2013-05-28 23:01     ` David Carlos Manuelda
  2013-05-28 23:55       ` Rich Freeman
  2013-05-29  6:28       ` Sergey Popov
  0 siblings, 2 replies; 6+ messages in thread
From: David Carlos Manuelda @ 2013-05-28 23:01 UTC (permalink / raw
  To: gentoo-dev

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

El Martes, 28 de mayo de 2013 14:03:52 Mike Frysinger escribió:
> On Tuesday 28 May 2013 13:53:54 Michał Górny wrote:
> > On Tue, 28 May 2013 16:43:10 +0200 David Carlos Manuelda wrote:
> > > I posted a bug about that along with a suggestion, despite sometimes I
> > > do
> > > not explain myself correctly (I am very sorry): bug #471590
> > > 
> > > Many packages are bundling its own libraries rather than link against
> > > system ones, and there is a bug tracker for that (bug #251464)
> > > [...]
> > > What I propose for example, is a very good and simple approach: to have
> > > an option in portage's make.conf, something like that (the name may
> > > change):
> > > 
> > > 1.- USE_SYSTEM_LIBRARIES="cairo sqlite XXX"
> > > 2.- USE_SYSTEM_LIBRARIES="* -cairo"
> > > 3.- USE_SYSTEM_LIBRARIES="*"
> > 
> > I don't think we should do it like this.
> > 
> > Bundling libraries is a pathological case. In general, we should work
> > on fixing this and getting rid of bundled libraries. In that general
> > case, the flags are not required.
> 
> +1
> -mike
Ok, thinking it better I agree, that having them use system libraries is far 
better, but why then those affected ebuilds have corresponding USE disabled by 
default?

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries
  2013-05-28 23:01     ` David Carlos Manuelda
@ 2013-05-28 23:55       ` Rich Freeman
  2013-05-29  6:28       ` Sergey Popov
  1 sibling, 0 replies; 6+ messages in thread
From: Rich Freeman @ 2013-05-28 23:55 UTC (permalink / raw
  To: gentoo-dev

On Tue, May 28, 2013 at 7:01 PM, David Carlos Manuelda
<stormbyte@gmail.com> wrote:
> Ok, thinking it better I agree, that having them use system libraries is far
> better, but why then those affected ebuilds have corresponding USE disabled by
> default?

Probably because the use of those system libraries is experimental.
If they worked reliably most likely the maintainer would have stripped
the bundled library completely and not made it optional.

Rich


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

* Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries
  2013-05-28 23:01     ` David Carlos Manuelda
  2013-05-28 23:55       ` Rich Freeman
@ 2013-05-29  6:28       ` Sergey Popov
  1 sibling, 0 replies; 6+ messages in thread
From: Sergey Popov @ 2013-05-29  6:28 UTC (permalink / raw
  To: gentoo-dev

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

29.05.2013 03:01, David Carlos Manuelda пишет:
> El Martes, 28 de mayo de 2013 14:03:52 Mike Frysinger escribió:
>> On Tuesday 28 May 2013 13:53:54 Michał Górny wrote:
>>> On Tue, 28 May 2013 16:43:10 +0200 David Carlos Manuelda wrote:
>>>> I posted a bug about that along with a suggestion, despite sometimes I
>>>> do
>>>> not explain myself correctly (I am very sorry): bug #471590
>>>>
>>>> Many packages are bundling its own libraries rather than link against
>>>> system ones, and there is a bug tracker for that (bug #251464)
>>>> [...]
>>>> What I propose for example, is a very good and simple approach: to have
>>>> an option in portage's make.conf, something like that (the name may
>>>> change):
>>>>
>>>> 1.- USE_SYSTEM_LIBRARIES="cairo sqlite XXX"
>>>> 2.- USE_SYSTEM_LIBRARIES="* -cairo"
>>>> 3.- USE_SYSTEM_LIBRARIES="*"
>>>
>>> I don't think we should do it like this.
>>>
>>> Bundling libraries is a pathological case. In general, we should work
>>> on fixing this and getting rid of bundled libraries. In that general
>>> case, the flags are not required.
>>
>> +1
>> -mike
> Ok, thinking it better I agree, that having them use system libraries is far 
> better, but why then those affected ebuilds have corresponding USE disabled by 
> default?
> 
How do you imaging use of system library( called "foo", for example) if
foo, bundled in program(called "bar", for same reason :-)) is fork with
new features that is suitable only for "bar"?

It's ideal situation when "bar" works also with system "foo"(not all
features works, however). Sometimes(and it happens very often, to be
honest) "bar" can not work with system "foo" at all! For example, look
at quake3-1.36-r1.ebuild, at commented "use system jpeg" patch. If you
uncomment it, quake3 will be built against system jpeg. It will build
successfully, but textures will be a big mess of polygons.

So, unfortunately, it's not even an option here, unless somebody will do
a great work for splitting this library and write a huge patch, that
will be totally rejected by upstream(so he will have to maintain this
patch on his own).

-- 
Best regards, Sergey Popov
Gentoo developer
Gentoo Desktop Effects project lead
Gentoo Qt project lead


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 555 bytes --]

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

end of thread, other threads:[~2013-05-29  6:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-28 14:43 [gentoo-dev] Better handling of USE flags to enable/disable system libraries David Carlos Manuelda
2013-05-28 17:53 ` Michał Górny
2013-05-28 18:03   ` Mike Frysinger
2013-05-28 23:01     ` David Carlos Manuelda
2013-05-28 23:55       ` Rich Freeman
2013-05-29  6:28       ` Sergey Popov

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