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



Also with the first change:
http://cgit.collabora.com/git/user/vivek/ostree.git/commit/?h=commit-index-ii&id=b7924c99243ade253b26317a77b4449d380a39c5
I think it'd be best if we compute the sizes just before writing out the
commit object, by traversing the tree again.  As opposed to gathering
the information in stage_object().   The problem is
that if say you do a commit like this:

$ mkdir overlay
$ touch overlay/usr/bin/foo
$ ostree commit -b --tree=ref=gnome-ostree/buildmaster/x86_64-runtime --tree=dir=overlay

We'll only end up writing .sizes that contains the object usr/bin/foo, because
the commit logic there won't call stage_object() for everything that's already in
gnome-ostree/buildmaster/x86_64-runtime.

Not quite, because the next commit adds the copy of the sizes from the existing
ref into the new commit's size cache, so that committing from multiple refs still produces a size cache.

I suppose another problem arises because the overlay might contain files
with the same paths, so we need to de-dupe by path as well as checksum
so that the size cacheis accurate.




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