Skip to content

Commit 928da3c

Browse files
author
Nicolas Guibourge
committed
toolkit - use local /run folder in chroot instead of mounted tmpfs
1 parent cc2475d commit 928da3c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

toolkit/tools/internal/buildpipeline/buildpipeline.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,16 @@ func CleanupDockerChroot(chroot string) (err error) {
184184
var folderToKeep = []string{
185185
"dev",
186186
"proc",
187-
"run",
188187
"localrpms",
189188
"upstream-cached-rpms",
190189
"sys",
191190
chrootUse,
192191
}
193192

193+
var folderToCreate = []string{
194+
"run",
195+
}
196+
194197
logger.Log.Debugf("cleanup Chroot -> %s", chroot)
195198

196199
rootFolder, err := os.Open(chroot)
@@ -222,5 +225,13 @@ func CleanupDockerChroot(chroot string) (err error) {
222225
}
223226
}
224227

228+
// create some folder(s) once chroot has been cleaned up
229+
for _, folder := range folderToCreate {
230+
err = os.Mkdir(filepath.Join(chroot, folder), os.ModePerm)
231+
if err != nil {
232+
logger.Log.Warnf("Creation of %s folder in chroot %s failed: %v", folder, chroot, err)
233+
}
234+
}
235+
225236
return
226237
}

0 commit comments

Comments
 (0)