apps on different partitions/media

Alexander Larsson alexl at redhat.com
Mon Apr 11 12:19:10 UTC 2016


On mån, 2016-04-11 at 13:12 +0100, Robert McQueen wrote:
> On 11/04/16 12:32, Alexander Larsson wrote:
> > 
> > Its kind of a hack, but could you not just patch in symlinks in the
> > right place in the xdg-app system repo.
> > 
> > So, for instance:
> > 
> > mkdir -p /var/lib/xdg-app/app/com.endlessm.OldApp/x86_64/master/
> > ln -s /old/install/dir /var/lib/xdg-
> > app/app/com.endlessm.OldApp/x86_64/master/old-version
> > ln -s old-version active
> > 
> > You have to add a metadata file to the app too.
> > 
> > I think xdg-app would pick this up as an installed app fine, and if
> > you set up the right
> > config in the system repo it may even update it correctly.
> If I understand correctly, this would make xdg-app think that this
> app 
> was installed, but it wouldn't really be deployed from the ostree?
> This 
> means that when you did an update, it would essentially download the
> app 
> all over again and deploy it "over" the other one?

Yeah.

> I was thinking more like having a separate ostree repo on the
> external 
> device and having all of the off-system apps belong to that repo,
> very 
> much like a --user repo.

Well, in terms of code this wouldn't really be all that hard. All the
code that does the multi-repo support is already split out into
XdgAppDir which you just pass a pathname to. However, I'm not sure we
want to expose something like that as a command line argument, since
its kind of a corner case.

Maybe we can expose this via libxdg-app (in fact it already has
xdg_app_installation_new_for_path()) and your migration tool can be
written to use that.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a short-sighted misogynist vagrant on the edge. She's a disco-crazy 
antique-collecting vampire with the soul of a mighty warrior. They fight 
crime! 





More information about the xdg-app mailing list