chiark / gitweb /
makebuildserver: use jessie32.box from cache, if present
authorHans-Christoph Steiner <hans@eds.org>
Fri, 22 Jan 2016 12:33:14 +0000 (13:33 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 26 Jan 2016 10:31:40 +0000 (11:31 +0100)
makebuildserver

index 4e575a09b449054222da82e233170c37770f79da..ca2dc56ff4c01d16893fa36beddc3de8fc286d47 100755 (executable)
@@ -46,11 +46,16 @@ parser.add_option("--debian-mirror", default="http://http.debian.net/debian/",
 options, args = parser.parse_args()
 
 # set up default config
+cachedir = os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver')
 config = {
     'arch64': False,
     'basebox': 'jessie32',
-    'baseboxurl': 'https://f-droid.org/jessie32.box',
-    'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
+    # TODO in py3, convert this to pathlib.Path(absolute_path_string).as_uri()
+    'baseboxurl': [
+        'file://' + os.path.join(cachedir, 'jessie32.box'),
+        'https://f-droid.org/jessie32.box',
+    ],
+    'cachedir': cachedir,
     'cpus': 1,
     'memory': 3584,
 }