Skip to content

Commit b7b591a

Browse files
committed
docs: Explain the directory strucutre of source directories
See #499
1 parent 7c1d174 commit b7b591a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/flatpak-builder.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,26 @@
542542
<listitem><para>
543543
When downloading sources (archives, files, git, bzr, svn), look in this
544544
directory for pre-existing copies and use them instead of downloading.
545+
The directory must match the state directory structure:
546+
<itemizedlist>
547+
<listitem>
548+
<para>Files and archives must be inside the folder: <filename>downloads/&lt;sha256&gt;/</filename></para>
549+
</listitem>
550+
<listitem>
551+
<para>
552+
Sources of type <literal>git</literal>, <literal>bzr</literal> and <literal>svn</literal>
553+
must be inside the folder: <filename>&lt;type&gt;/&lt;converted-uri&gt;/</filename>
554+
</para>
555+
</listitem>
556+
</itemizedlist>
557+
The <literal>converted-uri</literal> is constructed from <literal>path</literal> or <literal>url</literal> (in case of <literal>git</literal>)
558+
and from <literal>url</literal> (in case of <literal>bzr</literal> and <literal>svn</literal>). <literal>://</literal> is converted to a single
559+
underscore and every other <literal>/</literal> is replaced by an underscore. For example, <literal>https://github.com/user/repo.git</literal>
560+
becomes <literal>https_github.com_user_repo.git</literal>.
561+
562+
In case of <literal>svn</literal> sources if <literal>revision</literal> is present, the folder name is
563+
<filename>svn/&lt;converted-uri&gt;__r&lt;revision&gt;/</filename>. In case of <literal>git</literal>
564+
sources, it needs to be a mirrored clone.
545565
</para></listitem>
546566
</varlistentry>
547567

0 commit comments

Comments
 (0)