View previous topic :: View next topic |
Author |
Message |
Nathanael n00b
Joined: 08 Jun 2003 Posts: 4 Location: SPAIN
|
Posted: Tue Jun 24, 2003 6:39 am Post subject: How to Improve emerge/make.conf? |
|
|
Fist of all, I think this is the best place to the post but if I'm wrong, or if this has been posted before, please just tell me.
Second sorry for my bad English but is not my mother tonge.
Since I began with gentoo I enjoyed to much to be able to take control of every part of the system, but (Yes there is always a but! ) I found that some parts of the process are unnecessarily "complicated".
So I want to know if out there is more people like me, and how they think things could be improved.
Example:
I think is a lost of time have to change the USE variables every time I re-build some program if in my make.conf are not the ones I wanted to use with it.
I partially solved this using ufed a lot of times, and putting the different sets commented, but still I have to uncomment the lines I need for the program at the moment I emerge it.
So I think it would be a good idea to change it a bit, letting it to be able to identify one package and the set of USE flags that the user wants to use exclusively with it.
Someting like:
----------------------------------------------------------------------------------------------------
default USE="mmx 3dnow memlimit gtk2 cups"
kadebase USE="cups"
gnome USE="-alsa"
...
and so on..
---------------------------------------------------------------------------------------------------
Still letting the user to control what he/she wants and also releasing it to do an unnecessary extra work. _________________ "La única pregunta estúpida es la no formulada" |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Tue Jun 24, 2003 11:27 am Post subject: |
|
|
Well. What I do is always start with a emerge -pv package. e.g.
Code: |
root@aragorn puggy # emerge -pv gimp
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild U ] media-gfx/gimp-1.2.4 [1.2.3-r3] +python +nls -gnome +aalib +perl +doc +jpeg +png +tiff +do
|
Then I figure out which flags I want and change make.conf if I think the changes should be permanent which is nearly always. For a single package however you can just change the use flags like so...
Code: |
root@aragorn puggy # USE="-python +gnome -aalib" emerge -pv gimp
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild U ] media-gfx/gimp-1.2.4 [1.2.3-r3] -python +nls -gnome -aalib +perl +doc +jpeg +png +tiff +doc
|
Then obviously
Code: | root@aragorn puggy # USE="-python +gnome -aalib" emerge gimp | to actually emerge the package.
Of course you have to do this every time you emerge that package.
When do you have these occurances of not wanting something in the make.conf? I've only wanted to do that once I think, and it was only as the package wouldn't build with a certain flag. _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Nathanael n00b
Joined: 08 Jun 2003 Posts: 4 Location: SPAIN
|
Posted: Tue Jun 24, 2003 1:55 pm Post subject: |
|
|
Yes, I already know all that, thanks (You know, the portage User Guide and all the other Docs, and of course the Forums!! )
And normally is a good way to me, and is what I do in my home computer.
But in diferent fields like in the work network (more than 20 computers with gentoo installed, from one P90 to a PowerPC G4 through a Pentium4).
Where you have the same programs in diferent machines with the same config to ensure compatibility and equality of features. And at the same time you have to provide the best yield, is a bit of stress to have to change the make.conf every time you upgrade a program or rebuild one because you detected some incompatibility issue, or just because you forgot one. _________________ "La única pregunta estúpida es la no formulada" |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Tue Jun 24, 2003 2:38 pm Post subject: |
|
|
I like the idea! To slightly modify it, maybe a -r (--remember) option could be added to emerge to remember the any options desired for a specific package. That way during the emerge it would save the settings for mod_php and use those settings for any other updates as in when an update for mod_php is available. It could also save other info as well, such as whether you want to stay current for a masked package.
Any command line options would be saved for that package (version independant)
Code: | ACCEPT_KEYWORDS="~x86" USE="-x -alsa mysql" emerge -r something |
Then subsequent updates would maintain the commandline settings for "something" _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Tue Jun 24, 2003 2:56 pm Post subject: |
|
|
The -r option would also fit very easily into a database based version of emerge, since it would already have sql ability, addings comand line settings would be easy.
See the portage database thread. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
RedBeard0531 Guru
Joined: 21 Sep 2002 Posts: 415 Location: maryland
|
Posted: Tue Jun 24, 2003 3:04 pm Post subject: |
|
|
Portage already (sorta) does this.
Code: |
# cat /var/db/pkg/x11-base/xfree-4.3.0-r2/USE
x86 oss apm avi crypt cups encode gif jpeg libg++ libwww mikmod mmx mpeg ncurses pdflib png quicktime spell truetype xml2 xmms xv zlib directfb alsa gdbm berkdb slang readline arts aalib svga tcltk java guile X sdl gpm tcpd pam perl python esd imlib oggvorbis gtk qt kde opengl acpi dga doc ethereal fbcon gd ggi gps gtk2 jikes nptl pcmcia pic pnp samba socks5 trusted usb wavelan -3dnow -nls -ssl -gnome -motif
|
To reintall xfree using the same vars
Code: | # USE=`cat /var/db/pkg/x11-base/xfree-4.3.0-r2/USE` emerge -pv xfree |
_________________ OH MY GOD! Kenny just killed Kenny!
That Basterd! |
|
Back to top |
|
|
KiTaSuMbA Guru
Joined: 28 Jun 2002 Posts: 430 Location: Naples Italy
|
Posted: Tue Jun 24, 2003 3:20 pm Post subject: |
|
|
RedBeard0531 wrote: | Portage already (sorta) does this.
Code: |
# cat /var/db/pkg/x11-base/xfree-4.3.0-r2/USE
x86 oss apm avi crypt cups encode gif jpeg libg++ libwww mikmod mmx mpeg ncurses pdflib png quicktime spell truetype xml2 xmms xv zlib directfb alsa gdbm berkdb slang readline arts aalib svga tcltk java guile X sdl gpm tcpd pam perl python esd imlib oggvorbis gtk qt kde opengl acpi dga doc ethereal fbcon gd ggi gps gtk2 jikes nptl pcmcia pic pnp samba socks5 trusted usb wavelan -3dnow -nls -ssl -gnome -motif
|
To reintall xfree using the same vars
Code: | # USE=`cat /var/db/pkg/x11-base/xfree-4.3.0-r2/USE` emerge -pv xfree |
|
That's a very good start for the -r option to get ontop: emerge -rpv <package> could do exactly that. A bit more work would be needed to handle "overrides" setting a priority of USE flags definitions in a manner that:
USE="new 'conflicting' flag, another flag" emerge -rpv <package> would set all USE flags from the -r function _except_ the conflicting ones and _adding_ the command line "USE=" defined ones. _________________ Need to flame people LIVE on IRC? Join #gentoo-otw on freenode! |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Tue Jun 24, 2003 4:08 pm Post subject: |
|
|
The cat method while useful is not what Nathanael needed, nor what I suggested.
I think that the -r option would be best to just remember the commandline options used to call emerge. That way it would not matter which mak.conf setting was overriden for the emerge, whether it is :
ACCEPT_KEYWORDS="~arch", USE=, FEATURES=, CFLAGS=, etc.
/etc/make.conf would be the primary user settings for emerges, & the -r option would remember any commandline overrides used to call emerge. Any desired changes for that one particular package emerge would be saved. Only the last one used would be saved, so that when trying to emerge a difficult compile the last one used re-writes over the previous one. When you finally get it right for "something" no further work is needed and no override versions need to be tracked or (forgotten) to be deleted.
Cancelling a previous -r save would be as easy as
Code: | emerge -r something |
as since there is no override options preceding the emerge command any previous options saved would be erased.
Doing Code: | emerge -u something
emerge -u world | would use the previous overrides saved using the -r option for any packages that have one saved.
It might be usefull for developers as well, when experimenting with ebuilds to compile and install correctly. Command line option changes could be saved and later incorporated into the ebuild, saving the time to edit and save then re-edit & save.
I beleive in KISS, Keep It Simple! Stupid. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
KiTaSuMbA Guru
Joined: 28 Jun 2002 Posts: 430 Location: Naples Italy
|
Posted: Tue Jun 24, 2003 4:25 pm Post subject: |
|
|
dol-sen:
The idea of including all env options of a specific emerge is more complete than just the USE flags although a lot more harder.
But even by that way, ovveriding ability should still exist since it's more often than not that a version upgrade comes with a new set of flags and sometimes deprecates older ones. (need an example? how about that -cjk on the xfree?). If -r works in an "absolute coherency" way, you just forced your user to set all the flags again by hand because of a single one little option he wants to add. _________________ Need to flame people LIVE on IRC? Join #gentoo-otw on freenode! |
|
Back to top |
|
|
Nathanael n00b
Joined: 08 Jun 2003 Posts: 4 Location: SPAIN
|
Posted: Tue Jun 24, 2003 5:16 pm Post subject: |
|
|
hummm..!
I see the diferent points of view, and I like both.
but maybe a diferent aproach would be useful too.
For example:
If you install one package for the first time the KISS emerge -r option would be fine, but
if is an update then doing emerge -r, first would do an emerge -pv, and then compare te flags, and if they are not the same, then keep only the coincident ones, erase the deprecated, and ask if you want the new ones.
So there would be no annoyances if it is not necessary.
PD:Excuse my spell please but im in a hurry... _________________ "La única pregunta estúpida es la no formulada" |
|
Back to top |
|
|
KiTaSuMbA Guru
Joined: 28 Jun 2002 Posts: 430 Location: Naples Italy
|
Posted: Tue Jun 24, 2003 5:46 pm Post subject: |
|
|
Nathanael wrote: | hummm..!
I see the diferent points of view, and I like both.
but maybe a diferent aproach would be useful too.
For example:
If you install one package for the first time the KISS emerge -r option would be fine, but
if is an update then doing emerge -r, first would do an emerge -pv, and then compare te flags, and if they are not the same, then keep only the coincident ones, erase the deprecated, and ask if you want the new ones.
So there would be no annoyances if it is not necessary.
PD:Excuse my spell please but im in a hurry... |
You just added automation to what I proposed, which makes it even nicer but requiring more lines of code.
/me blames himself for learning perl instead of python back when he had time to play.
_________________ Need to flame people LIVE on IRC? Join #gentoo-otw on freenode! |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Tue Jun 24, 2003 5:49 pm Post subject: |
|
|
What I was saying about the -r function is only to record the commandline, checking use flags and conflicts should already be done in emerge. Checking use flag conflicts and such should be done separately in emerge. After all, if you don't check on use flag changes now you may still have to re-emerge packages when you find something missing. The -r function should only make things more automatic for unique package needs, not global funtionality. I do agree with portage checking for and informing of confilcts, use flag changes between updates. That should be a different module within portage.
The -r function would be the last step in the make.globals => make.conf chain. The result would be
make.globals = default options setings
make.conf = user settings that override make.global settings
-r commandline option = records commandline overrides to the above for the package
KISS _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
|
|
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
|
|