From f89e004fa3a04fc5a1d5e9613e2bb70c0eeee9fe Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 25 Feb 2016 11:44:23 +0100 Subject: [PATCH] Remove origin repos on uninstall --- app/xdg-app-builtins-uninstall.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/xdg-app-builtins-uninstall.c b/app/xdg-app-builtins-uninstall.c index 376b91fa..4dd1bcd3 100644 --- a/app/xdg-app-builtins-uninstall.c +++ b/app/xdg-app-builtins-uninstall.c @@ -132,6 +132,13 @@ xdg_app_builtin_uninstall (int argc, char **argv, GCancellable *cancellable, GEr return FALSE; } + if (repository != NULL && + g_str_has_suffix (repository, "-origin") && + xdg_app_dir_get_remote_noenumerate (dir, repository)) + { + ostree_repo_remote_delete (xdg_app_dir_get_repo (dir), repository, NULL, NULL); + } + if (!xdg_app_dir_mark_changed (dir, error)) return FALSE;