diff --git a/doc/flatpak-builder.xml b/doc/flatpak-builder.xml index 6cc19e2b..a7816ebf 100644 --- a/doc/flatpak-builder.xml +++ b/doc/flatpak-builder.xml @@ -542,6 +542,26 @@ When downloading sources (archives, files, git, bzr, svn), look in this directory for pre-existing copies and use them instead of downloading. + The directory must match the state directory structure: + + + Files and archives must be inside the folder: downloads/<sha256>/ + + + + Sources of type git, bzr and svn + must be inside the folder: <type>/<converted-uri>/ + + + + The converted-uri is constructed from path or url (in case of git) + and from url (in case of bzr and svn). :// is converted to a single + underscore and every other / is replaced by an underscore. For example, https://github.com/user/repo.git + becomes https_github.com_user_repo.git. + + In case of svn sources if revision is present, the folder name is + svn/<converted-uri>__r<revision>/. In case of git + sources, it needs to be a mirrored clone. diff --git a/src/builder-main.c b/src/builder-main.c index 45103629..70fb8bbb 100644 --- a/src/builder-main.c +++ b/src/builder-main.c @@ -107,7 +107,7 @@ static GOptionEntry entries[] = { { "disable-updates", 0, 0, G_OPTION_ARG_NONE, &opt_disable_updates, "Only download missing sources, never update to latest vcs version", NULL }, { "download-only", 0, 0, G_OPTION_ARG_NONE, &opt_download_only, "Only download sources, don't build", NULL }, { "bundle-sources", 0, 0, G_OPTION_ARG_NONE, &opt_bundle_sources, "Bundle module sources as runtime", NULL }, - { "extra-sources", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_sources_dirs, "Add a directory of sources specified by SOURCE-DIR, multiple uses of this option possible", "SOURCE-DIR"}, + { "extra-sources", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_sources_dirs, "Add an extra source directory with state directory structure. The option can be repeated", "SOURCE-DIR"}, { "extra-sources-url", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_sources_urls, "Add a url of sources specified by SOURCE-URL multiple uses of this option possible", "SOURCE-URL"}, { "build-only", 0, 0, G_OPTION_ARG_NONE, &opt_build_only, "Stop after build, don't run clean and finish phases", NULL }, { "finish-only", 0, 0, G_OPTION_ARG_NONE, &opt_finish_only, "Only run clean and finish and export phases", NULL },