Re: copy_modules fails in ostadmin, no errors printed
- From: Colin Walters <walters verbum org>
- To: Diego Escalante Urrelo <diegoe igalia com>
- Cc: ostree-list gnome org
- Subject: Re: copy_modules fails in ostadmin, no errors printed
- Date: Wed, 15 Aug 2012 12:48:10 -0400
On Tue, 2012-08-14 at 21:13 -0500, Diego Escalante Urrelo wrote:
> Hi,
>
>
> While setting up ostree in my box, I hit a problem when dracut ran
> because it could not find some modules.
Ok, can you debug what the error is? Try just using "strace" or
something?
> Apparently copy_modules in ot-admin-builtin-deply.c fails for some
> reason but the GError is not being printed at all.
>
> The function is returning TRUE despite **error being set.
Hmm...this is very likely to be a bug in the "fallback copy" code in
ot_gio_shutil_cp_al_or_fallback(). My main setup uses hard links. Do
you have separate partitions for /ostree and /lib or something?
> Worse, when finishing, ot-admin-main.c does not print anything related
> to *error (it should, right?).
Yeah, if we're returning TRUE, then it won't print an error. But we do
have a printf. See:
http://git.gnome.org/browse/ostree/tree/src/ostadmin/ot-admin-main.c#n133
> I suspect the reusage of **error between many functions is causing some
> hiccups.
That's *very* standard GObject/C. I basically write all of my code like
it's a library, so every function that can fail throws a GError, leaving
how to handle errors up to the caller. In this case, that's all the way
up to main(), which just prints it and exits with 1 or 0.
I really dislike the "print something and continue" school of error
handling since it can easily make things worse. For example, on out of
disk space, you really don't want to keep adding tons of stuff to
~/.xsession-errors...
> I am attaching a small verbosity addition for that function (proposing),
> and a handy debug patch which lead me to this conclusion/suspicion.
But what does your debug patch print? What's the error string?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]