Repository/ostree cleanup

Alexander Larsson alexl at redhat.com
Wed Jan 11 20:44:47 UTC 2017


On Wed, 2017-01-11 at 21:41 +0100, Alexander Larsson wrote:
> On Wed, 2017-01-11 at 14:39 -0600, Dan Nicholson wrote:
> > On Tue, Jan 10, 2017 at 4:53 AM, Alexander Larsson <alexl at redhat.co
> > m>
> > wrote:
> > > 
> > > I don't think it is ever unsafe to delete old versions, or am I
> > > missing
> > > something? I mean, clearly you can't install the versions being
> > > deleted, or
> > > be in the process of downloading it. However, if you have an old
> > > version
> > > locally installed, removing it from the remote should be ok (i.e.
> > > keep
> > > working locally and still be able to pull the latest version).
> > 
> > The problem I'm thinking of is that an old commit gets pruned and
> > removes an object that the concurrent pull into the repo requires.
> > As
> > far as I know, there's no guard against that in ostree. Normally I
> > don't think this would happen, but I think it's entirely possible
> > that
> > an app could ship a file 2 versions ago, remove it in the previous
> > version because it was not thought to be needed, and then added
> > back
> > with the same content in the current version when it was determined
> > that it was needed. I.e., an overagressive cleanup list in the
> > builder
> > manifest.
> > 
> > If you're pruning v-2 while pulling/committing v, it's entirely
> > possible that the commit will think the object exists and not
> > commit
> > it again, right? I think that's what
> > https://bugzilla.gnome.org/show_bug.cgi?id=759442 is all about,
> > isn't
> > it?
> 
> Well, thats a slightly different case though. Pruning a repo while
> commitíng to it, and yes, that is not safe for that reason.
> 
> It should be safe to prune an old commit from a repo while at the
> same
> time pulling another commit *from* that repo.

In other words, if you make sure that your modifications to the repo
are not in parallel, it is safe to purge old commits while having users
downloading the latest versions.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a notorious one-eyed messiah from the Mississippi delta. She's a 
sharp-shooting hip-hop cab driver with the power to see death. They fight 
crime! 



More information about the xdg-app mailing list