Skip to content

Commit beca25b

Browse files
author
Tarek Galal
committed
Honor cache.size over __config__.mounts.cache.size
1 parent 9d18bea commit beca25b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

inception/argparsers/makers/maker_cache.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def make(self, workDir, outDir):
1717
assert os.path.exists(make_ext4fsBin), \
1818
"%s does not exist, please update %s to the correct path" % (make_ext4fsBin, key)
1919

20-
cacheSize = self.config.getMountConfig("cache.size", "auto")
20+
cacheSize = self.getMakeValue("size")
21+
if cacheSize is None: cacheSize = self.config.getMountConfig("cache.size", "auto")
22+
2123
if type(cacheSize) is not int or cacheSize <= 0:
2224
cacheSize = os.path.getsize(updatePkgPath) if os.path.exists(updatePkgPath) else 0
2325
cacheSize = int(cacheSize / (1024 * 1024)) + 10 #safe offset to not fail?

0 commit comments

Comments
 (0)