fix: add keys to keyserver for installing gcc

This commit is contained in:
Amin Yahyaabadi 2022-02-15 00:03:03 -08:00
parent 2d754debe8
commit 76832b81a5
4 changed files with 7 additions and 16 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -43,13 +43,7 @@ export async function setupGcc(version: string, _setupDir: string, arch: string)
"deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe",
"ppa:ubuntu-toolchain-r/test",
])
binDir = (
await setupAptPack("g++", version, [
"deb http://dk.archive.ubuntu.com/ubuntu/ xenial main",
"deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe",
"ppa:ubuntu-toolchain-r/test",
])
).binDir
binDir = (await setupAptPack("g++", version, [])).binDir
} else {
info(`Install g++-multilib because gcc for ${arch} was requested`)
await setupAptPack("gcc-multilib", version, [
@ -57,13 +51,7 @@ export async function setupGcc(version: string, _setupDir: string, arch: string)
"deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe",
"ppa:ubuntu-toolchain-r/test",
])
binDir = (
await setupAptPack("g++-multilib", version, [
"deb http://dk.archive.ubuntu.com/ubuntu/ xenial main",
"deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe",
"ppa:ubuntu-toolchain-r/test",
])
).binDir
binDir = (await setupAptPack("g++-multilib", version, [])).binDir
}
break
}

View File

@ -37,6 +37,9 @@ export async function setupAptPack(
"ca-certificates",
"gnupg",
])
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "3B4FE6ACC0B21F32"])
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "40976EAF437D05B5"])
await execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "1E9377A2BA9EF27F"])
didInit = true
}