Re: Extending ostree's functionality (adding a metadat index)



On Fri, 2013-08-23 at 13:16 +0100, Vivek Dasmohapatra wrote:
Obviously the ideal scenario for us is if this gets absorbed by
upstream ostree - if it's not suitable for inclusion for some reason
please let me know and I'll see what I can do about any problem(s).

And that works a lot better if I include the code:

http://cgit.collabora.com/git/user/vivek/ostree.git/log/

Ok, I am about to push a few cherry-picked patches.  First,
a very minor thing; please use spaces between identifier and
paren.  You had a bit in:

http://cgit.collabora.com/git/user/vivek/ostree.git/commit/?id=b9a4f37781d4606a0be298172297746d786c4e97

Needs to be:

if (g_strcmp0 ("-",
             ^ space

Second, be careful to always handle errors.  For example, I am going
to add on top of:
http://cgit.collabora.com/git/user/vivek/ostree.git/commit/?id=fce54005cce8ee2e4d8fab4142be07c6443cb97a

$ git diff
diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c
index cef63d8..9607f4d 100644
--- a/src/ostree/ot-builtin-trivial-httpd.c
+++ b/src/ostree/ot-builtin-trivial-httpd.c
@@ -349,6 +349,8 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GFile *repo_path, GCancella
                                G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK,
                                G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
                                cancellable, error);
+      if (!info)
+        goto out;
 
       is_symlink = g_file_info_get_is_symlink (info);
 

One of your other commits was also missing error handling for a
queryinfo.

I applied some fixes on top of your trivial-httpd patches, redid the
commit messages per style, and pushed.  Thanks, and keep them
coming!




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]