Skip to content

Commit bb20ff9

Browse files
committed
Added additional paths for ukify in shell.go to support different installations of ukify.
1 parent f990d62 commit bb20ff9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

internal/chroot/deb/installer.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,15 @@ func (debInstaller *DebInstaller) InstallDebPkg(targetOsConfigDir, chrootEnvPath
192192
"-- %s %s %s",
193193
debArch, pkgListStr, suite, chrootEnvPath, localRepoConfigPath)
194194

195-
// Set environment variables to ensure non-interactive installation
195+
// Set environment variables to ensure non-interactive installation.
196+
// PYTHONDONTWRITEBYTECODE skips py3compile during postinst scripts, which
197+
// is very slow under QEMU user-mode emulation in cross-arch builds. Python
198+
// will recompile bytecode on first execution on the target device.
196199
envVars := []string{
197200
"DEBIAN_FRONTEND=noninteractive",
198201
"DEBCONF_NONINTERACTIVE_SEEN=true",
199202
"DEBCONF_NOWARNINGS=yes",
203+
"PYTHONDONTWRITEBYTECODE=1",
200204
}
201205

202206
if _, err = shell.ExecCmdWithStream(cmd, true, shell.HostPath, envVars); err != nil {

internal/utils/shell/shell.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ var commandMap = map[string][]string{
108108
"touch": {"/usr/bin/touch"},
109109
"truncate": {"/usr/bin/truncate"},
110110
"tune2fs": {"/usr/sbin/tune2fs"},
111-
"ukify": {"/usr/bin/ukify"},
111+
"ukify": {"/usr/bin/ukify", "/usr/local/bin/ukify"},
112112
"umount": {"/usr/bin/umount"},
113113
"uname": {"/usr/bin/uname"},
114114
"uniq": {"/usr/bin/uniq"},

0 commit comments

Comments
 (0)