Sunday, June 12, 2011

Progress in dd

So copying those images with dd sometimes just makes me anxious. Good thing you can get it to print some progress by sending dd the USR1 signal.

sudo kill -USR1 $(pgrep '^dd')

That former command will let me know something is happening when copying stuff to those sd cards that don't even blink ;-)

Thursday, April 07, 2011

PackageKit debuginfo on MeeGo

So MeeGo comes with PackageKit, it's not completely stable, so sometimes when things are going wrong

So running the daemon in verbose mode can provide loads of information, we can start by doing that by running this:

sudo /usr/libexec/packagekitd --verbose --disable-timer

That command will run successfully if the daemon isn't running yet of course. Now if we want to go the extra mile and provide a useful bug report we'll need to install debugging packages:

pkcon repo-enable core-debuginfo
pkcon repo-enable updates-core-debuginfo
pkcon refresh
pkcon install PackageKit-debuginfo libzypp-debuginfo gdb

So now we can attatch gdb to the pid corresponding to packagekitd:
sudo gdb -p `pgrep packagekitd`

If all goes well, you'll see a couple of key messages while gdb is loading like these:
Reading symbols from /usr/libexec/packagekitd...Reading symbols from /usr/lib/debug/usr/libexec/packagekitd.debug...done.
done.
Reading symbols from /usr/lib/libpackagekit-glib2.so.14...Reading symbols from /usr/lib/debug/usr/lib/libpackagekit-glib2.so.14.0.3.debug...done.
done.
Reading symbols from /usr/lib/packagekit-backend/libpk_backend_zypp.so...Reading symbols from /usr/lib/debug/usr/lib/packagekit-backend/libpk_backend_zypp.so.debug...done.

After loading, we'll get a prompt where we just continue the execution by entering a c:
(gdb) c

If there's a crash, we'll have a chance to see or provide a backtrace by typing in bt at the gdb prompt.