Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-catalyst] [PATCH 7/8] catalyst: Make parent directories of snapshots/
Date: Fri, 15 May 2020 06:10:31
Message-Id: 20200515061001.2581484-7-mattst88@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 1/8] doc: Remove extra asterisk by Matt Turner
1 Otherwise, if /var/tmp/catalyst does not exist when the snapshot target
2 is executed it will fail to make the snapshots/ directory.
3
4 Signed-off-by: Matt Turner <mattst88@g.o>
5 ---
6 catalyst/base/targetbase.py | 2 +-
7 1 file changed, 1 insertion(+), 1 deletion(-)
8
9 diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
10 index 5bcea920..3e338bee 100644
11 --- a/catalyst/base/targetbase.py
12 +++ b/catalyst/base/targetbase.py
13 @@ -24,7 +24,7 @@ class TargetBase(ABC):
14 def set_snapshot(self, treeish=None):
15 # Make snapshots directory
16 snapshot_dir = Path(self.settings['storedir'], 'snapshots')
17 - snapshot_dir.mkdir(mode=0o755, exist_ok=True)
18 + snapshot_dir.mkdir(mode=0o755, parents=True, exist_ok=True)
19
20 repo_name = self.settings['repo_name']
21 if treeish is None:
22 --
23 2.26.2