Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit 8f97116

Browse files
authored
Merge pull request #29 from peat-psuwit/fix-mount-tmp-archive
Make sure /var/cache/apt/archives exist before mounting tmpfs
2 parents 8fe4a62 + fe60a0d commit 8f97116

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ubports-qa

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ class WritableRootFS:
5151
ensure_root()
5252
subprocess.run(["mount", "-o", "rw,remount", "/"])
5353
LOG.debug("Making sure we have enough free space for archives.")
54+
# Make sure this directory exists. Sometimes it doesn't on a freshly-flashed system.
55+
os.makedirs("/var/cache/apt/archives", exist_ok=True)
5456
subprocess.run(["mount", "-t", "tmpfs", "tmpfs", "/var/cache/apt/archives"])
5557

5658
@classmethod

0 commit comments

Comments
 (0)