Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries

2013-05-29 Thread Sergey Popov
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



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] Better handling of USE flags to enable/disable system libraries

2013-05-28 Thread David Carlos Manuelda
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.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries

2013-05-28 Thread Michał Górny
On Tue, 28 May 2013 16:43:10 +0200
David Carlos Manuelda stormb...@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


signature.asc
Description: PGP signature


Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries

2013-05-28 Thread Mike Frysinger
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


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries

2013-05-28 Thread 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?

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Better handling of USE flags to enable/disable system libraries

2013-05-28 Thread Rich Freeman
On Tue, May 28, 2013 at 7:01 PM, David Carlos Manuelda
stormb...@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