Fix building without libarchive
Although libarchive is an optional build option, the build fails without it. https://bugzilla.gnome.org/show_bug.cgi?id=764056
This commit is contained in:
parent
09238da065
commit
2454957e8d
|
|
@ -290,7 +290,6 @@ write_libarchive_entry_to_mtree (OstreeRepo *self,
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
create_empty_dir_with_uidgid (OstreeRepo *self,
|
create_empty_dir_with_uidgid (OstreeRepo *self,
|
||||||
|
|
@ -308,6 +307,7 @@ create_empty_dir_with_uidgid (OstreeRepo *self,
|
||||||
|
|
||||||
return _ostree_repo_write_directory_meta (self, tmp_dir_info, NULL, out_csum, cancellable, error);
|
return _ostree_repo_write_directory_meta (self, tmp_dir_info, NULL, out_csum, cancellable, error);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ostree_repo_import_archive_to_mtree:
|
* ostree_repo_import_archive_to_mtree:
|
||||||
|
|
@ -331,6 +331,7 @@ ostree_repo_import_archive_to_mtree (OstreeRepo *self,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_LIBARCHIVE
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
struct archive *a = archive;
|
struct archive *a = archive;
|
||||||
struct archive_entry *entry;
|
struct archive_entry *entry;
|
||||||
|
|
@ -393,6 +394,11 @@ ostree_repo_import_archive_to_mtree (OstreeRepo *self,
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
|
#else
|
||||||
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||||
|
"This version of ostree is not compiled with libarchive support");
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue