diff --git a/builder/builder-manifest.c b/builder/builder-manifest.c index d6d4b7807..3d9a3211c 100644 --- a/builder/builder-manifest.c +++ b/builder/builder-manifest.c @@ -1530,9 +1530,6 @@ builder_manifest_build_shell (BuilderManifest *self, if (found == NULL) return flatpak_fail (error, "Can't find module %s", modulename); - if (!builder_module_get_sources (found)) - return flatpak_fail (error, "No sources for module %s", modulename); - if (!builder_module_build (found, NULL, context, TRUE, error)) return FALSE; @@ -1566,7 +1563,7 @@ builder_manifest_build (BuilderManifest *self, return TRUE; } - if (!builder_module_get_sources (m)) + if (!builder_module_should_build (m)) { g_print ("Skipping module %s (no sources)\n", name); continue; diff --git a/builder/builder-module.c b/builder/builder-module.c index 733ae39cf..62b385f3b 100644 --- a/builder/builder-module.c +++ b/builder/builder-module.c @@ -826,6 +826,19 @@ builder_module_is_enabled (BuilderModule *self, return TRUE; } +gboolean +builder_module_should_build (BuilderModule *self) +{ + if (self->sources != NULL) + return TRUE; + + /* We allow building simple types even without sources, that is often useful */ + if (!g_strcmp0 (self->buildsystem, "simple")) + return TRUE; + + return FALSE; +} + gboolean builder_module_get_disabled (BuilderModule *self) { diff --git a/builder/builder-module.h b/builder/builder-module.h index c13c3c64d..22933e8a7 100644 --- a/builder/builder-module.h +++ b/builder/builder-module.h @@ -43,6 +43,7 @@ const char * builder_module_get_name (BuilderModule *self); gboolean builder_module_is_enabled (BuilderModule *self, BuilderContext *context); gboolean builder_module_get_disabled (BuilderModule *self); +gboolean builder_module_should_build (BuilderModule *self); GList * builder_module_get_sources (BuilderModule *self); GList * builder_module_get_modules (BuilderModule *self); void builder_module_set_json_path (BuilderModule *self,