summaryrefslogtreecommitdiff
path: root/builder/builder-cache.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-01-14 11:16:17 +0100
committerAlexander Larsson <alexl@redhat.com>2016-01-14 11:16:17 +0100
commitf3bf30334c483c11679c5465cf869f38cab70126 (patch)
tree91b85dcb29fffcda38b6f0ae0c226627fbf786c3 /builder/builder-cache.c
parent7fb1309488656721fff47c2e57ae5e79a47c307b (diff)
downloadxdg-app-f3bf30334c483c11679c5465cf869f38cab70126.tar.gz
builder: Also apply cleanup to changes in usr
Diffstat (limited to 'builder/builder-cache.c')
-rw-r--r--builder/builder-cache.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/builder/builder-cache.c b/builder/builder-cache.c
index f919e42..877a33a 100644
--- a/builder/builder-cache.c
+++ b/builder/builder-cache.c
@@ -496,9 +496,7 @@ builder_cache_get_changes (BuilderCache *self,
g_autoptr(GPtrArray) removed = g_ptr_array_new_with_free_func (g_object_unref);
g_autoptr(GPtrArray) added_paths = g_ptr_array_new_with_free_func (g_free);
g_autoptr(GFile) current_root = NULL;
- g_autoptr(GFile) current_files = NULL;
g_autoptr(GFile) parent_root = NULL;
- g_autoptr(GFile) parent_files = NULL;
g_autoptr(GVariant) variant = NULL;
g_autofree char *parent_commit = NULL;
int i;
@@ -506,8 +504,6 @@ builder_cache_get_changes (BuilderCache *self,
if (!ostree_repo_read_commit (self->repo, self->last_parent, &current_root, NULL, NULL, error))
return NULL;
- current_files = g_file_get_child (current_root, "files");
-
if (!ostree_repo_load_variant (self->repo, OSTREE_OBJECT_TYPE_COMMIT, self->last_parent,
&variant, NULL))
return NULL;
@@ -517,12 +513,11 @@ builder_cache_get_changes (BuilderCache *self,
{
if (!ostree_repo_read_commit (self->repo, parent_commit, &parent_root, NULL, NULL, error))
return FALSE;
- parent_files = g_file_get_child (parent_root, "files");
}
if (!ostree_diff_dirs (OSTREE_DIFF_FLAGS_NONE,
- parent_files,
- current_files,
+ parent_root,
+ current_root,
modified,
removed,
added,
@@ -531,7 +526,7 @@ builder_cache_get_changes (BuilderCache *self,
for (i = 0; i < added->len; i++)
{
- char *path = g_file_get_relative_path (current_files, g_ptr_array_index (added, i));
+ char *path = g_file_get_relative_path (current_root, g_ptr_array_index (added, i));
g_ptr_array_add (added_paths, path);
}