FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 08-23-2011, 06:49 AM
Nikos Chantziaras
 
Default Per-package splitdebug FEATURE

On 08/23/2011 09:17 AM, Leonardo Guilherme wrote:

Hi.

I've turned on splitdebug feature (and -ggdb in CFLAGS) so debug
information are saved and I can debug anything that crashes. I went to
/usr/lib/debug, just out of curiosity, to see how much space was taken
and I found that it was almost 2GB, which chromium + firefox adds up
1.5GB and python gets another 0.3. I would like to disable splitdebug
for these specific packages now and in the future, so removing
splitdebug from features, re-emerging them and then activating
splitdebug again won't quite cut.

I wonder if there's a way to active features to some specific
packages, just like USE flags.


There is. And it's a very powerful one even. First, remove -ggdb (I
use just -g though; if you don't need the extra info -ggdb gives, plain
-g will save you some space and time) from your CFLAGS and splitdebug
from your FEATURES in make.conf. Then, create a file:


/etc/portage/env/splitdebug.conf

with the following contents:

CFLAGS="${CFLAGS} -ggdb"
CXXFLAGS="${CXXFLAGS} -ggdb"
FEATURES="${FEATURES} splitdebug"

Now, in /etc/portage/package.env, you can "execute" splitdebug.conf for
the packages you want. My package.env for example looks like:


sys-libs/glibc splitdebug.conf
media-libs/mesa splitdebug.conf
kde-base/kdelibs splitdebug.conf
kde-base/kwin splitdebug.conf

The result is that, for example, when glibc is emerged, splitdebug.conf
is executed which adds -ggdb to CFLAGS and CXXFLAGS (do not forget
CXXFLAGS!) and splitdebug to FEATURES.


As you can guess, you can create arbitrary .conf files like this; it
isn't in any way specific to splitdebug.
 
Old 08-23-2011, 06:56 AM
Yohan Pereira
 
Default Per-package splitdebug FEATURE

On Tuesday 23 Aug 2011 03:17:41 Leonardo Guilherme wrote:

> I wonder if there's a way to active features to some specific

> packages, just like USE flags.

*

Yes i think you can use /etc/portage/env for something like this

for eg

if you want to enable it for amarok

create a file /etc/portage/env/media-sound/amarok

with the contents

*

CFLAGS="-march=core2 -O1 -g"

CXXFLAGS="${CFLAGS}"

*

FEATURES="splitdebug"

*

MAKEOPTS="-j3"

*

*

--

*

- Yohan Pereira

*

"A man can do as he will, but not will as he will" - Schopenhauer
 
Old 08-23-2011, 07:02 AM
Leonardo Guilherme
 
Default Per-package splitdebug FEATURE

Thats what I call worthy information! Thank you so much, Yohan and Nikos!

> FEATURES="${FEATURES} splitdebug"

What if I want to use splitdebug always and just deactivate it to some
packages, -splitdebug on FEATURES will undo the splitdebug already
set?
like

FEATURES="${FEATURES} -splitdebug"

Thanks again!
 
Old 08-23-2011, 09:30 AM
netfab
 
Default Per-package splitdebug FEATURE

Le 23/08/11 ŕ 04:02, Leonardo a tapoté :
> What if I want to use splitdebug always and just deactivate it to some
> packages

Another way is to enable splitdebug globally, but not install
debug files for specific packages :

/etc/portage/env/do-not-install-debug-files.conf:

INSTALL_MASK="/usr/lib/debug"

/etc/portage/env/package.env:

www-client/firefox do-not-install-debug-files.conf

If you are using FEATURES="buildpkg" you can set INSTALL_MASK into
make.conf : debug files will never be installed, but will be
available into tbz2 packages.
 
Old 09-01-2011, 12:50 AM
Leonardo Guilherme
 
Default Per-package splitdebug FEATURE

2011/8/23 netfab <netfab@gmail.com>:
> Le 23/08/11 ŕ 04:02, Leonardo a tapoté :
>> What if I want to use splitdebug always and just deactivate it to some
>> packages
>
> Another way is to enable splitdebug globally, but not install
> debug files for specific packages :
>
> * /etc/portage/env/do-not-install-debug-files.conf:
>
> * * * *INSTALL_MASK="/usr/lib/debug"
>
> * /etc/portage/env/package.env:
>
> * * * *www-client/firefox do-not-install-debug-files.conf
>
> If you are using FEATURES="buildpkg" you can set INSTALL_MASK into
> make.conf : debug files will never be installed, but will be
> available into tbz2 packages.
>
>

Exactly what I wanted! Thank you! All of you

--

Leonardo
 
Old 09-01-2011, 12:50 AM
Leonardo Guilherme
 
Default Per-package splitdebug FEATURE

2011/8/23 netfab <netfab@gmail.com>:
> Le 23/08/11 ŕ 04:02, Leonardo a tapoté :
>> What if I want to use splitdebug always and just deactivate it to some
>> packages
>
> Another way is to enable splitdebug globally, but not install
> debug files for specific packages :
>
> * /etc/portage/env/do-not-install-debug-files.conf:
>
> * * * *INSTALL_MASK="/usr/lib/debug"
>
> * /etc/portage/env/package.env:
>
> * * * *www-client/firefox do-not-install-debug-files.conf
>
> If you are using FEATURES="buildpkg" you can set INSTALL_MASK into
> make.conf : debug files will never be installed, but will be
> available into tbz2 packages.
>
>

Exactly what I wanted! Thank you! All of you

--

Leonardo
 

Thread Tools




All times are GMT. The time now is 06:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org