Bundle sources: bundling has to happen before the extracting

In the case of the source-file we have code that handle
the file inline. When we extract the source we do set
the url with that inline data. In get_download_location
that is also used by the bundling code we do then
check against this url and fail.
tingping/wmclass
Simon Schampijer 2017-04-10 10:24:36 +02:00
parent a9e217a729
commit 5d52f93a25
4 changed files with 6 additions and 4 deletions

View File

@ -225,7 +225,7 @@ git_mirror_submodules (const char *repo_location,
if (g_strcmp0 (words[0], "160000") != 0)
continue;
if (!builder_git_mirror_repo (absolute_url, update, TRUE, disable_fsck, words[2], context, error))
if (!builder_git_mirror_repo (absolute_url, NULL, update, TRUE, disable_fsck, words[2], context, error))
return FALSE;
}
}

View File

@ -399,6 +399,7 @@ main (int argc,
g_autoptr(GFile) build_subdir = NULL;
if (!builder_git_mirror_repo (opt_from_git,
NULL,
!opt_disable_updates, FALSE, FALSE,
git_branch, build_context, &error))
{

View File

@ -1184,10 +1184,10 @@ builder_module_build (BuilderModule *self,
g_print ("Building module %s in %s\n", self->name, source_dir_path);
g_print ("========================================================================\n");
if (!builder_module_extract_sources (self, source_dir, context, error))
if (builder_context_get_bundle_sources (context) && !builder_module_bundle_sources (self, context, error))
return FALSE;
if (builder_context_get_bundle_sources (context) && !builder_module_bundle_sources (self, context, error))
if (!builder_module_extract_sources (self, source_dir, context, error))
return FALSE;
if (self->subdir != NULL && self->subdir[0] != 0)

View File

@ -206,6 +206,7 @@ builder_source_git_download (BuilderSource *source,
return FALSE;
if (!builder_git_mirror_repo (location,
NULL,
update_vcs, TRUE, self->disable_fsckobjects,
get_branch (self),
context,
@ -274,7 +275,7 @@ builder_source_git_bundle (BuilderSource *source,
if (!builder_git_mirror_repo (location,
mirror_dir_path,
FALSE, TRUE,
FALSE, TRUE, FALSE,
get_branch (self),
context,
error))