66
77 "github.com/FascodeNet/alterlinux/alteriso5/cmd/build/work/airootfs"
88 "github.com/FascodeNet/alterlinux/alteriso5/cmd/build/work/boot"
9- "github.com/FascodeNet/alterlinux/alteriso5/cmd/build/work/chroot"
109 "github.com/FascodeNet/alterlinux/alteriso5/utils"
1110)
1211
@@ -26,8 +25,10 @@ var makeBaseDirs *BuildTask = NewBuildTask("makeBaseDirs",
2625
2726var makeChroot * BuildTask = NewBuildTask ("makeChroot" , func (work * Work ) error {
2827
29- dir := path .Join (work .Base , work .target .Arch , "airootfs" )
30- env := chroot .New (dir , work .target .Arch )
28+ env , err := airootfs .New (work .GetDirs ().Pacstrap , work .target .Arch )
29+ if err != nil {
30+ return err
31+ }
3132 if err := env .Init (); err != nil {
3233 return err
3334
@@ -73,21 +74,22 @@ var makeBootModes *BuildTask = NewBuildTask("makeBootModes", func(w *Work) error
7374 return err
7475 }
7576
77+
78+
7679 return nil
7780 })
7881
79- return makeSysLinux . Run ( w )
82+ return w . RunOnce ( makeSysLinux )
8083})
8184
8285var makeAirootfs * BuildTask = NewBuildTask ("makeAirootfs" , func (w * Work ) error {
8386
8487 slog .Debug ("Copying profile to airootfs..." )
8588 airootfsDir := path .Join (w .Base , w .target .Arch , "airootfs" )
86- isoDir := path .Join (w .Base , "iso" )
8789
8890 sqfs := airootfs.SquashFS {
8991 Base : airootfsDir ,
90- Out : path .Join (isoDir , w .profile .InstallDir , w .target .Arch , "airootfs.sfs" ),
92+ Out : path .Join (w . GetDirs (). Iso , w .profile .InstallDir , w .target .Arch , "airootfs.sfs" ),
9193 }
9294
9395 return sqfs .Build ()
0 commit comments