Skip to content

Commit

Permalink
feat: bring apt-source compilation earlier (#1554)
Browse files Browse the repository at this point in the history
Signed-off-by: Xing Lv <xlv20@fudan.edu.cn>
  • Loading branch information
n063h committed Apr 10, 2023
1 parent dd48167 commit e383395
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/lang/ir/v1/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,22 +286,22 @@ func (g *generalGraph) CompileLLB(uid, gid int) (llb.State, error) {
if err != nil {
return llb.State{}, errors.Wrap(err, "failed to get the base image")
}
aptMirror := g.compileUbuntuAPT(base)

// prepare dev env: stable operations should be done here to make it cache friendly
if g.Dev {
dev := g.compileDevPackages(base)
dev := g.compileDevPackages(aptMirror)
sshd := g.compileSSHD(dev)
horust := g.installHorust(sshd)
starship := g.compileStarship(horust)
userGroup := g.compileUserGroup(starship)
base = userGroup
aptMirror = userGroup
}

lang, err := g.compileLanguage(base)
lang, err := g.compileLanguage(aptMirror)
if err != nil {
return llb.State{}, errors.Wrap(err, "failed to compile language")
}
aptMirror := g.compileUbuntuAPT(base)
systemPackages := g.compileSystemPackages(aptMirror)
merge := llb.Merge([]llb.State{
base,
Expand Down

0 comments on commit e383395

Please sign in to comment.