Skip to content

Commit

Permalink
unpacker: Also set flag to make failure to label fatal
Browse files Browse the repository at this point in the history
There's no immediate need for this; was just a lead
I was chasing down while debugging
ostreedev/ostree#775

Closes: #724
Approved by: jlebon
  • Loading branch information
cgwalters authored and rh-atomic-bot committed Apr 5, 2017
1 parent 1c1dba8 commit b060ecd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libpriv/rpmostree-postprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,7 @@ rpmostree_commit (int rootfs_fd,
#if OSTREE_CHECK_VERSION(2017,4)
modifier_flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED;
#endif
/* If changing this, also look at changing rpmostree-unpacker.c */
commit_modifier = ostree_repo_commit_modifier_new (modifier_flags, NULL, NULL, NULL);
ostree_repo_commit_modifier_set_xattr_callback (commit_modifier,
read_xattrs_cb, NULL,
Expand Down
7 changes: 6 additions & 1 deletion src/libpriv/rpmostree-unpacker.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ import_rpm_to_repo (RpmOstreeUnpacker *self,
g_autoptr(GFile) root = NULL;
OstreeRepoCommitModifier *modifier = NULL;
OstreeRepoImportArchiveOptions opts = { 0 };
OstreeRepoCommitModifierFlags modifier_flags = 0;
glnx_unref_object OstreeMutableTree *mtree = NULL;
char *tmpdir = NULL;
guint64 buildtime = 0;
Expand All @@ -712,7 +713,11 @@ import_rpm_to_repo (RpmOstreeUnpacker *self,
else
filter = compose_filter_cb;

modifier = ostree_repo_commit_modifier_new (0, filter, &fdata, NULL);
/* If changing this, also look at changing rpmostree-postprocess.c */
#if OSTREE_CHECK_VERSION(2017,4)
modifier_flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED;
#endif
modifier = ostree_repo_commit_modifier_new (modifier_flags, filter, &fdata, NULL);
ostree_repo_commit_modifier_set_xattr_callback (modifier, xattr_cb,
NULL, self);
ostree_repo_commit_modifier_set_sepolicy (modifier, sepolicy);
Expand Down

0 comments on commit b060ecd

Please sign in to comment.