Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO (Experiment): Slim down by removing USE flags
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
termite
Guru
Guru


Joined: 06 May 2007
Posts: 466

PostPosted: Wed Aug 08, 2007 8:30 pm    Post subject: Reply with quote

The point was to see what flags could be removed without losing functionality. I should rephrase the original post, I suppose.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Wed Aug 08, 2007 9:30 pm    Post subject: Reply with quote

termite wrote:
The point was to see what flags could be removed without losing functionality.

You will always loose functionality, otherwise the USE-flag would not be there. It only depends on whether one considers this functionality crucial or not. As a typical example, the earlier mentioned berkdb USE-flag in subversion will allow you to store your repository in another format. So without this USE-flag you will not have this option. But if you did not use that repository format anyway (IIRC another format is the default) and do not access other people's repository, you will not miss anything. But nevertheless, there is a loss in functionality...

Of course, documenting very detailed the effect of each useflags for each package is a different story...
Back to top
View user's profile Send private message
termite
Guru
Guru


Joined: 06 May 2007
Posts: 466

PostPosted: Wed Aug 08, 2007 10:04 pm    Post subject: Reply with quote

Losing functionality is a relative thing. Yes, I lost theoretical functionality by disabling the gnome flag on FF, but practically, I lost none, since I don't use those features.
Back to top
View user's profile Send private message
mope
Apprentice
Apprentice


Joined: 23 Feb 2003
Posts: 206

PostPosted: Thu Aug 09, 2007 1:27 am    Post subject: Reply with quote

termite wrote:
Losing functionality is a relative thing. Yes, I lost theoretical functionality by disabling the gnome flag on FF, but practically, I lost none, since I don't use those features.


s/b

Quote:
, since I havn't used those features, yet.

Or, even more accurately, how can you know what you've lost and whether you need it if you don't even know what "it" is? :)
Back to top
View user's profile Send private message
fallen
n00b
n00b


Joined: 10 Aug 2007
Posts: 22
Location: KC,MO

PostPosted: Fri Aug 10, 2007 5:03 pm    Post subject: Reply with quote

I think that http://gentoo-portage.com/ will help you on your quest.


You can look up use flags and see what they're for, and what packages use each one.
_________________
where it's at
Back to top
View user's profile Send private message
mope
Apprentice
Apprentice


Joined: 23 Feb 2003
Posts: 206

PostPosted: Fri Aug 10, 2007 5:25 pm    Post subject: Reply with quote

fallen wrote:
I think that http://gentoo-portage.com/ will help you on your quest.


You can look up use flags and see what they're for, and what packages use each one.


These will be USEful, as well ;)
Code:

#grep -i 'useflag' /usr/portage/profiles/use.desc
#grep -i 'useflag' /usr/portage/profiles/use.local.desc
Back to top
View user's profile Send private message
termite
Guru
Guru


Joined: 06 May 2007
Posts: 466

PostPosted: Fri Aug 10, 2007 8:25 pm    Post subject: Reply with quote

Yes, I'm aware that there are USE flag descriptions. My point was that most of them don't really tell you much.
Back to top
View user's profile Send private message
fallen
n00b
n00b


Joined: 10 Aug 2007
Posts: 22
Location: KC,MO

PostPosted: Fri Aug 10, 2007 8:54 pm    Post subject: Reply with quote

yeah, you're right, i often wish there was more to it.
_________________
where it's at
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Aug 11, 2007 12:09 pm    Post subject: Re: HOWTO (Experiment): Slim down by removing USE flags Reply with quote

mv wrote:
The whole "experiment" is rather useless, since you can have this much easier without recompiling anything:

That's a bit harsh isn't it? If it weren't useful to the OP s/he wouldn't have posted. Why not just say there's an easier way? And BTW you don't need a script to compare the files: 'man comm'.
mv wrote:
Another misunderstandings:
termite wrote:
How many (if any) libraries
Code:
revdep-rebuild -av
restored

revdep-rebuild only recompiles some packages (if they used a [deleted or upgraded] library) - it will not restore any of these libraries. If the packages should not be able to compile without these libraries, this is a depedency bug in the ebuild which should not occur. (However, even if it occurs, revdep-rebuild will not restore the missing library - instead, it will break with an error during the re-emerge in such a situation.)
But, as mentioned above, these dependency bugs are not very frequent.

Er that's not true. If the lib is a dep of the package, portage will install it when revdep asks it to remerge the broken package. (Adding -o to the call to revdep-rebuild will just build the deps of packages and not the packages themselves btw.) If it isn't a dep it's a bug in the ebuild.
Edit:
Quote:
Code:

#grep -i 'useflag' /usr/portage/profiles/use.desc
#grep -i 'useflag' /usr/portage/profiles/use.local.desc

Just use euse -i <flag> (in gentoolkit)
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sat Aug 11, 2007 3:32 pm    Post subject: Re: HOWTO (Experiment): Slim down by removing USE flags Reply with quote

steveL wrote:
mv wrote:
The whole "experiment" is rather useless, since you can have this much easier without recompiling anything:

That's a bit harsh isn't it? If it weren't useful to the OP s/he wouldn't have posted.

Yes, sorry. It didn't seem so harsh to me when I was typing it... my main intention was to prevent people from wasting time for things that can be done easier.
Quote:
And BTW you don't need a script to compare the files: 'man comm'.

"comm" is only useful in this case if the files are sorted (by package names) - so you first have to extract the names and then sort. Yes, this can be a one-liner, but nevertheless a script for this one-liner is useful, because it is frequently needed (at least, I use it frequently).
Quote:
mv wrote:
revdep-rebuild only recompiles some packages (if they used a [deleted or upgraded] library) - it will not restore any of these libraries.

Er that's not true. If the lib is a dep of the package, portage will install it when revdep asks it to remerge the broken package.

In this generality, you are correct. But we were speaking about libraries which were deleted by --depclean (after removal of some USE-flags), i.e. they have vanished because they are not anymore a dep of the package (unless --depclean were buggy, of course).
Quote:
Just use euse -i <flag> (in gentoolkit)

To add another very useful one: ufed.
However, the description is often not correct or at least misleading. For example, on the texlive ebuild you actually save space if you select things like zlib,t1lib,png (provided you have these libs installed anywa), because this will cause the installed libs to be used instead of compiling in a copy. You can only understand after reading the ebuild (and sometimes not even then) whether the flag is such an "use system library"-flag or whether it provides new functionality which requires the library.
Back to top
View user's profile Send private message
termite
Guru
Guru


Joined: 06 May 2007
Posts: 466

PostPosted: Sat Aug 11, 2007 3:38 pm    Post subject: Reply with quote

Quote:
You can only understand after reading the ebuild (and sometimes not even then) whether the flag is such an "use system library"-flag or whether it provides new functionality which requires the library.

And therein lies my point! How can anyone expect users to be able to select optimal (or even near-optimal) flags for themselves if they need to dig through a pile a ebuilds the size of China to do so, and even then can't be sure they know much more?

Better flag documentation is sorely needed...
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Aug 11, 2007 5:06 pm    Post subject: Re: HOWTO (Experiment): Slim down by removing USE flags Reply with quote

mv wrote:
Quote:
And BTW you don't need a script to compare the files: 'man comm'.

"comm" is only useful in this case if the files are sorted (by package names) - so you first have to extract the names and then sort. Yes, this can be a one-liner, but nevertheless a script for this one-liner is useful, because it is frequently needed (at least, I use it frequently).

You do? OK we'll add it to update then; you basically want to be able to change use flags and see the effect on world, right? Please tell me anything else you'd like in that regard on that thread.
Quote:
Quote:
Er that's not true. If the lib is a dep of the package, portage will install it when revdep asks it to remerge the broken package.

In this generality, you are correct. But we were speaking about libraries which were deleted by --depclean (after removal of some USE-flags), i.e. they have vanished because they are not anymore a dep of the package (unless --depclean were buggy, of course).

Ah sorry, my bad, I am a bit burnt-out so I didn't read the thread properly. If that's happening, then it's most likely a bug in the ebuild for --depclean to think that the library is not a dependency. In any event it is a bug and needs to be reported.
I really recommend running the unstable version of portage btw (and not your whole system ofc ;)
Quote:
To add another very useful one: ufed.
However, the description is often not correct or at least misleading. For example, on the texlive ebuild you actually save space if you select things like zlib,t1lib,png (provided you have these libs installed anywa), because this will cause the installed libs to be used instead of compiling in a copy. You can only understand after reading the ebuild (and sometimes not even then) whether the flag is such an "use system library"-flag or whether it provides new functionality which requires the library.

Yeah you're right about the use flag descriptions. Personally I'd make it compulsory to describe how the USE flag you're adding to an ebuild changes it. Yeah it's more metadata but it's useful.
Back to top
View user's profile Send private message
termite
Guru
Guru


Joined: 06 May 2007
Posts: 466

PostPosted: Sat Aug 11, 2007 5:13 pm    Post subject: Reply with quote

Quote:
Yeah you're right about the use flag descriptions. Personally I'd make it compulsory to describe how the USE flag you're adding to an ebuild changes it. Yeah it's more metadata but it's useful.

Absolutely! How can we campaign for this sort of thing? (or, how can we help, as mere mortal users?)
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sat Aug 11, 2007 7:50 pm    Post subject: Re: HOWTO (Experiment): Slim down by removing USE flags Reply with quote

steveL wrote:
mv wrote:
Quote:
And BTW you don't need a script to compare the files: 'man comm'.

"comm" is only useful in this case if the files are sorted (by package names) - so you first have to extract the names and then sort. Yes, this can be a one-liner, but nevertheless a script for this one-liner is useful, because it is frequently needed (at least, I use it frequently).

You do? OK we'll add it to update then; you basically want to be able to change use flags and see the effect on world, right?

No. Although this is off-topic, I usually do not use it to see the effect of useflag changes (although this also happens occasionally) but mainly to see whether everything is clean, i.e. whether an emerge -peD world shows exactly my installed packages and versions - then I usually unmerge the installed packages/slots not shown. In other words, I use it like a rigorous --depclean (originally, I had thought that this is equivalent to --depclean, but sometimes depclean is more careful and does not show all of these packages, in particular in connection with slots).
Back to top
View user's profile Send private message
synss
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 282
Location: Dijon > Berlin > Tokyo > Nürnberg > München

PostPosted: Fri Aug 24, 2007 8:01 am    Post subject: Re: HOWTO (Experiment): Slim down by removing USE flags Reply with quote

I have not read the whole thread I must say, but it is more or less written in the manual section 6.b how you can chose KDE
USE="-gtk -gnome qt3 qt4 kde"

however, removing things like the berkeley DB is probably a very bad idea... Either the program will use a self-implemented DB, which may not be as good as the berkeley one or no DB at all and therefore will run slower. Secondly, the berkeley DB is very small and you won't gain anything by removing it.
_________________
Compress portage tree
Elog viewer
Autodetect swap
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sat Aug 25, 2007 3:46 am    Post subject: Re: HOWTO (Experiment): Slim down by removing USE flags Reply with quote

synss wrote:
however, removing things like the berkeley DB is probably a very bad idea... Either the program will use a self-implemented DB, which may not be as good as the berkeley one or no DB at all[...]

I would not claim this in this generality. On my machine, for example, the berkdb useflag is only used by very few packages:
  • python and perl (and its libs). Here it is probably only needed to build a python/perl interface to these libs. You will probably need this only if you program in perl/python (I cannot imagine that otherwise you will have installed packages needing this interface).
  • subversion. This is the example I had mentioned earlier. Unless you have old svn repositories, you will not need it or profit from it.
  • apr-util. No idea why it is needed here. Actually, I do not even know what apr-util is good for if you do not run apache, but it is a dependency of some packages. :?
  • gdbm: I have no idea why a database has another database as an optional dependency. Looking at the ebuild and the configure script, it seems that just the berkdb is being linked when the useflag is set without having any other influence on the code. Very strange... :?

It seems that I could live with USE='-berkdb' as well, weren't it for some packages for which the dependency on berkley DB is non-optional.[/list]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum