Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Recompile (the whole) || (a part of) system with new cflags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Sun Nov 23, 2003 2:34 pm    Post subject: Recompile (the whole) || (a part of) system with new cflags Reply with quote

Have you ever tried to recompile the system with:
Code:
# emerge -e world

after you've changed CFLAGS in make.conf???

During this process my system has halted sometimes and i had to emerge other packages, this corrupted emerge -r option. Because i didn't want to re-emerge all ebuilds already recompiled with new CFLAGS, i've created a little python script that searches for packages compiled with the selected flags and recompiles them.

Here is my work, is called Gufo:
Code:
[...]


That old code is now obsolete Download gufo at SourceForge

EX:
Code:
#./gufo.py --help
usage: ./gufo.py [options]

        -h, --help              this message
        -C, --cflags=cflags     cflags to search
        -v, --invert-match      invert the sense of matching
        -r, --recompile         recompiles selected packages
        -a, --auto              auto (impilies recompile)
        -c, --compact           compact output


EX2: (if no options are specified the script reads flags in /etc/make.conf)
Code:
#./gufo.py
Please wait a moment, scanning database...

*  sys-kernel/linux-headers-2.4.19-r1
      CFLAGS: -O3 -mcpu=i686 -funroll-loops -pipe


I hope it will be useful ;)
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM


Last edited by neon on Sat May 15, 2004 6:33 pm; edited 3 times in total
Back to top
View user's profile Send private message
standsolid
Apprentice
Apprentice


Joined: 27 Aug 2002
Posts: 183
Location: Carlsbad, CA, USA

PostPosted: Mon Nov 24, 2003 7:20 am    Post subject: Reply with quote

dear God I wish I had this back in the day lol
had to do an emerge -ed world instead.

I haven't tried it yet, as I have no need atm, but I'm sure i'm screw up eventually and scramble for this
_________________
see gentoo differently... --> [[gui tools for gentoo linux]]<--
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Thu Jan 29, 2004 5:24 pm    Post subject: Reply with quote

new version 0.1.4

you can get it on SourceForge
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Sat May 15, 2004 6:40 pm    Post subject: Reply with quote

New version 0.2
- invert-match
- compact output
- reads /etc/make.conf

Sorry but there is no Documentation. If you understand how the script works and want to write two lines of doc you are welcome ;)

SourceForge Project
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
image
n00b
n00b


Joined: 03 Apr 2004
Posts: 17

PostPosted: Sun May 16, 2004 8:33 am    Post subject: Reply with quote

cool stuff. a couple suggestions... filter out the packages that have their CFLAGS forced (might need to check its ebuild), and secondly, add --oneshot to the emerge command, so that the world file doesnt get polluted with dependencies. otherwise, nice job. i especially like the 'make menuconfig' style of picking.
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Sun May 16, 2004 10:12 am    Post subject: Reply with quote

image wrote:
filter out the packages that have their CFLAGS forced (might need to check its ebuild)

It's in planning ;) i will check inherit section in ebuild's package (like flag-o-matic, kernel, etc.). Another thing that is missing is a package.mask style config file for files that do not need to be recompiled

Quote:
add --oneshot to the emerge command, so that the world file doesnt get polluted with dependencies

good idea...

thanks :)
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
seppe
Guru
Guru


Joined: 01 Sep 2003
Posts: 431
Location: Hove, Antwerp, Belgium

PostPosted: Mon May 17, 2004 4:31 pm    Post subject: Reply with quote

It would also be nice to get an output without version numbers, so old packages get instantly upgraded.

For example: emerge stops now because it can't find linux-headers-2.4.19-.. in my tree, probably because it's outdated but not yet upgraded at my system (and I always upgraded my system with emerge -uDv world, so I guess that's still not deep enough to upgrade ALL new packages where there is an update of (I know my English suxx :)) :(

For the rest: excellent script! This was exacly where I was looking for (because I use -Os instead of -O3 since a few weeks, I have already a lot of packages which are compiled with my new CFLAGS, so emerge -e world just to do the rest would be rather stupid).

Keep up the good work!
_________________
nitro-sources, because between stable and experimental there exists only speed

Latest release I made: 2.6.13.2-nitro1
Back to top
View user's profile Send private message
neon
l33t
l33t


Joined: 04 Aug 2003
Posts: 759
Location: Catania, Italy, Europe

PostPosted: Thu May 20, 2004 2:02 pm    Post subject: Reply with quote

seppe wrote:
It would also be nice to get an output without version numbers, so old packages get instantly upgraded.

Good hint...

New version 0.2.2 has this option: -g

seppe wrote:
For example: emerge stops now because it can't find linux-headers-2.4.19-.. in my tree, probably because it's outdated but not yet upgraded at my system (and I always upgraded my system with emerge -uDv world, so I guess that's still not deep enough to upgrade ALL new packages where there is an update of (I know my English suxx :)) :(

Your packages are updated, the problem is that gufo scans the compilation logs and don't mind if a package has been removed from the portage... i must fix this prob (someday)

P.S. also my english is not very good, we can speak in latin or another "universal" language ;)
_________________
Io credo che le tecnologie siano moralmente neutrali fino a quando non le utilizziamo - William Gibson

LINEE GUIDA DEL FORUM
Back to top
View user's profile Send private message
xeonburn
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 172

PostPosted: Fri May 21, 2004 2:38 pm    Post subject: Reply with quote

what's wrong with using emerge -e world? I did it just for gnome... when it borked I did emerge --resume --skipfirst and recompiled that one later individually.
Back to top
View user's profile Send private message
teedog
Apprentice
Apprentice


Joined: 09 Mar 2004
Posts: 211

PostPosted: Fri May 28, 2004 9:49 pm    Post subject: Reply with quote

xeonburn wrote:
what's wrong with using emerge -e world? I did it just for gnome... when it borked I did emerge --resume --skipfirst and recompiled that one later individually.


Is it because of the sequence of compiled packages? Perhaps system packages must be compiled/recompiled before the others. I remember someone suggested doing emerge -e system followed by emerge -e world when the system is borked. I guess emerge -e world by itself might cause problems?
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
Page 1 of 1

 
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