Finding the size of xdg-apps

Dan Nicholson nicholson at endlessm.com
Tue Dec 22 17:02:50 UTC 2015


On Dec 22, 2015 8:42 AM, "Alexander Larsson" <alexl at redhat.com> wrote:
>
> On tis, 2015-12-22 at 11:48 +0000, Emmanuele Bassi wrote:
> > Hi Richard;
> >
> > On 22 December 2015 at 11:30, Richard Hughes <hughsient at gmail.com>
> > wrote:
> >
> > > I need to find the size of an xdg-app application or runtime. In
> > > GNOME
> > > Software we usually show the download size for not-yet-installed
> > > applications and the size-on-disk for installed apps, and I'm
> > > wondering what xdg-app can provide in this regard. We normally
> > > round
> > > up to the nearest Mb, so it really doesn't have to be that accurate
> > > at
> > > all. Thanks!
> >
> > I was going to ask for the same; Endless users usually have limited
> > bandwidth at their disposal, and showing the download size beforehand
> > allows them to decide whether or not to update the app on their
> > current connection or wait until a better time (e.g. during the
> > night).
>
> I'm not sure exactly what it does, but there is this flag:
>   OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES
>
> Maybe it can help?
>
> Of course, for updates the story is more complex.

I'm not sure how this works with static xdeltas, but for commits it adds an
entry to the commit object variant with the uncompressed sizes. Here's how
we're using it in our updater.

https://github.com/endlessm/eos-updater/blob/master/src/eos-updater-poll.c

Of course, xdg-app needs to set that flag when making commits. I'm not sure
it entirely fits the purpose here, but it seems like a good start.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20151222/80b8d23c/attachment.html>


More information about the xdg-app mailing list