Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] splitdebug

2 views
Skip to first unread message

Bo Ørsted Andresen

unread,
Jun 14, 2006, 5:00:16 PM6/14/06
to
If I want to take full advantage of the new splitdebug feature. Should I then
emerge -e world? I don't think the backtraces doc [1] answers that.

[1] http://www.gentoo.org/proj/en/qa/backtraces.xml

--
Bo Andresen

Richard Fish

unread,
Jun 14, 2006, 5:40:06 PM6/14/06
to
On 6/14/06, Bo Ørsted Andresen <bo.an...@zlin.dk> wrote:
> If I want to take full advantage of the new splitdebug feature. Should I then
> emerge -e world? I don't think the backtraces doc [1] answers that.

For "full" advantage, yes, you would need to emerge -e world, since
otherwise the debugging information will only be generated for new
merges. And of course, any binary packages won't get debug symbols in
any case.

But if there is a specific program you are wanting to get backtraces
from, you can simplify by just re-merging that program and dependant
libraries.

-Richard

--
gento...@gentoo.org mailing list

Bo Ørsted Andresen

unread,
Jun 14, 2006, 5:50:11 PM6/14/06
to
On Wednesday 14 June 2006 23:28, Richard Fish wrote:
> For "full" advantage, yes, you would need to emerge -e world, since
> otherwise the debugging information will only be generated for new
> merges.  And of course, any binary packages won't get debug symbols in
> any case.

Thanks. Good to know.

> But if there is a specific program you are wanting to get backtraces
> from, you can simplify by just re-merging that program and dependant
> libraries.

Like this:

# emerge -ep kontact kmail knode akregator | awk '$1~/ebuild/{print $4}' | \
sed -e 's/\-[0-9][A-Za-z0-9._-]*$//' | grep lib | xargs emerge -vp

Or how else to know?

--
Bo Andresen

Richard Fish

unread,
Jun 14, 2006, 8:10:06 PM6/14/06
to
On 6/14/06, Bo Ørsted Andresen <bo.an...@zlin.dk> wrote:
> Like this:
>
> # emerge -ep kontact kmail knode akregator | awk '$1~/ebuild/{print $4}' | \
> sed -e 's/\-[0-9][A-Za-z0-9._-]*$//' | grep lib | xargs emerge -vp

This will merge all of system. I was thinking more like:

ldd `which kontact kmail knode akregator` | grep '=>' | awk '{print $3}' \
| sort | uniq | xargs equery belongs | grep '/' | sort | uniq \
| xargs printf "=%s\n" | xargs emerge -p --oneshot

(Ok people, have at it. Show me how you can do this in 5 commands or less.)

-Richard


>
> Or how else to know?
>
> --
> Bo Andresen
>
>
>

--
gento...@gentoo.org mailing list

Bo Ørsted Andresen

unread,
Jun 14, 2006, 8:30:12 PM6/14/06
to
On Thursday 15 June 2006 02:01, Richard Fish wrote:
> I was thinking more like:
>
> ldd `which kontact kmail knode akregator` | grep '=>' | awk '{print $3}' \
>     | sort | uniq | xargs equery belongs | grep '/' | sort | uniq \
>     | xargs printf "=%s\n" | xargs emerge -p --oneshot
>
> (Ok people, have at it.  Show me how you can do this in 5 commands or
> less.)

Very nice. :)

I guess this would do:

# ldd `which kontact kmail knode akregator` | awk '$2~/^=>$/{print $3}' | \
sort -u | xargs equery belongs | sort -u | while read pkg; do grep -q \
splitdebug /var/db/pkg/"$pkg"/FEATURES || echo ="$pkg"; done | \
xargs emerge -p1

:)

--
Bo Andresen

Bo Ørsted Andresen

unread,
Jun 14, 2006, 9:20:06 PM6/14/06
to
Just in case others are interested I ended out with this script:

===============================================
#/bin/bash

for arg in $@; do
if [[ "${arg}" =~ "^\-" ]]; then
EMERGE_ARGS="${EMERGE_ARGS} ${arg}"
else
BINARIES="${BINARIES} ${arg}"
fi
done

PKG_LIST=`which ${BINARIES} | xargs -r ldd | awk '$2~/^=>$/{print $3}' | \
sort -u | xargs -r equery belongs | sort -u | while read pkg; do grep -q \
splitdebug /var/db/pkg/"$pkg"/FEATURES || echo ="$pkg"; done | xargs`

if [[ -n "${PKG_LIST}" ]]; then
emerge --verbose --oneshot ${EMERGE_ARGS} ${PKG_LIST}
fi
===============================================

This allows me to run it with -a or --ask to avoid having to wait for equery
and emerge twice.

Thanks Richard. :)

--
Bo Andresen

Richard Fish

unread,
Jun 14, 2006, 10:00:14 PM6/14/06
to
On 6/14/06, Bo Ørsted Andresen <bo.an...@zlin.dk> wrote:
> Just in case others are interested I ended out with this script:

Very nice!

Neil Bothwick

unread,
Jun 15, 2006, 5:00:10 AM6/15/06
to
On Wed, 14 Jun 2006 17:01:18 -0700, Richard Fish wrote:

> ldd `which kontact kmail knode akregator` | grep '=>' | awk '{print
> $3}' \
> | sort | uniq | xargs equery belongs | grep '/' | sort | uniq \
> | xargs printf "=%s\n" | xargs emerge -p --oneshot
>
> (Ok people, have at it. Show me how you can do this in 5 commands or
> less.)

<pedant>That should be "five commands or fewer"</pedant> :)

awk does pattern matching, so you can drop the first grep and use
awk '/=>/ {print $3}'

The second grep appears redundant too, when i tried this, all lines
contained '/'.

Both invocations of uniq are unnecessary, use sort -u instead.

Replacing 'xargs printf "=%s\n"' with 'sed s/^/=/' is technically one
less command, although the same number of pipeline stages.

So that's five commands removed without thinking or adding anything
original... I should be a consultant :)


--
Neil Bothwick

WinErr 01B: Illegal error - You are not allowed to get this error.
Next time you will get a penalty for that.

signature.asc
0 new messages