[1] http://www.gentoo.org/proj/en/qa/backtraces.xml
--
Bo Andresen
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
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
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
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
===============================================
#/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
Very nice!
> 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.