[ostree] deploy: Error out if we see usr/etc
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] deploy: Error out if we see usr/etc
- Date: Fri, 5 Jul 2013 21:41:35 +0000 (UTC)
commit ecb3f0de035c09d8b280ac116eeede483638fd5d
Author: Colin Walters <walters verbum org>
Date: Fri Jul 5 17:29:07 2013 -0400
deploy: Error out if we see usr/etc
This version of the code doesn't know what to do with new-model trees,
so just abort if we see that. We'll likely never care about upgrades
from 1.0 to 2.0.
src/ostree/ot-admin-builtin-deploy.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c
index 4569761..c13ac56 100644
--- a/src/ostree/ot-admin-builtin-deploy.c
+++ b/src/ostree/ot-admin-builtin-deploy.c
@@ -509,6 +509,7 @@ deploy_tree (OtAdminDeploy *self,
{
ProcessOneCheckoutData checkout_data;
ot_lobj GFile *triggers_run_path = NULL;
+ gs_unref_object GFile *usr_etc_path = NULL;
g_print ("ostadmin: Creating deployment %s\n",
gs_file_get_path_cached (self->deploy_target_path));
@@ -528,6 +529,14 @@ deploy_tree (OtAdminDeploy *self,
if (checkout_data.caught_error)
goto out;
+ usr_etc_path = g_file_resolve_relative_path (deploy_target_path_tmp, "usr/etc");
+ if (g_file_query_exists (usr_etc_path, NULL))
+ {
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+ "Error: This tree contains usr/etc; it is likely an OS in version 2.0 format, and
this version of OSTree does not support it");
+ goto out;
+ }
+
triggers_run_path = g_file_resolve_relative_path (deploy_target_path_tmp,
"usr/share/ostree/triggers-run");
if (!g_file_query_exists (triggers_run_path, NULL))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]