mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
makebuildserver: cache defaults to ~/.cache/fdroidserver
This also provides a config option to override that default. ~/.cache is a standard location on GNU/Linux machines for cached content. It is also good to have the cache outside of the git repo in case `git clean -fdx` is run, which would delete all files in the directory that are not part of the git repo, including buildserver/cache/
This commit is contained in:
parent
3bd8ef2c8c
commit
cda8fa00f5
@ -14,6 +14,13 @@
|
|||||||
# or if you have a cached local copy, you can use that first:
|
# or if you have a cached local copy, you can use that first:
|
||||||
# baseboxurl = ["file:///home/fdroid/fdroidserver/cache/jessie32.box", "https://f-droid.org/jessie32.box"]
|
# baseboxurl = ["file:///home/fdroid/fdroidserver/cache/jessie32.box", "https://f-droid.org/jessie32.box"]
|
||||||
|
|
||||||
|
# In the process of setting up the build server, many gigs of files
|
||||||
|
# are downloaded (Android SDK components, gradle, etc). These are
|
||||||
|
# cached so that they are not redownloaded each time. By default,
|
||||||
|
# these are stored in ~/.cache/fdroidserver
|
||||||
|
#
|
||||||
|
# cachedir = 'buildserver/cache'
|
||||||
|
|
||||||
# To specify which Debian mirror the build server VM should use, by
|
# To specify which Debian mirror the build server VM should use, by
|
||||||
# default it uses http.debian.net, which auto-detects which is the
|
# default it uses http.debian.net, which auto-detects which is the
|
||||||
# best mirror to use.
|
# best mirror to use.
|
||||||
|
@ -50,6 +50,7 @@ config = {
|
|||||||
'arch64': False,
|
'arch64': False,
|
||||||
'basebox': 'jessie32',
|
'basebox': 'jessie32',
|
||||||
'baseboxurl': 'https://f-droid.org/jessie32.box',
|
'baseboxurl': 'https://f-droid.org/jessie32.box',
|
||||||
|
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
|
||||||
'cpus': 1,
|
'cpus': 1,
|
||||||
'memory': 3584,
|
'memory': 3584,
|
||||||
}
|
}
|
||||||
@ -72,9 +73,9 @@ if options.clean:
|
|||||||
vagrant(['destroy', '-f'], cwd=serverdir, printout=options.verbose)
|
vagrant(['destroy', '-f'], cwd=serverdir, printout=options.verbose)
|
||||||
|
|
||||||
# Update cached files.
|
# Update cached files.
|
||||||
cachedir = os.path.join('buildserver', 'cache')
|
cachedir = config['cachedir']
|
||||||
if not os.path.exists(cachedir):
|
if not os.path.exists(cachedir):
|
||||||
os.mkdir(cachedir)
|
os.makedirs(cachedir, 0755)
|
||||||
|
|
||||||
cachefiles = [
|
cachefiles = [
|
||||||
('android-sdk_r24.4.1-linux.tgz',
|
('android-sdk_r24.4.1-linux.tgz',
|
||||||
|
Loading…
Reference in New Issue
Block a user