(srcPath, dstPath string)
| 720 | if err != nil { |
| 721 | return err |
| 722 | } |
| 723 | cmd := exec.CommandContext(ctx, "mkarchroot", "-C", pacmanConf, "-M", makepkgConf, //nolint:gosec |
| 724 | filepath.Join(conf.Basedir.Work, chrootDir, pristineChroot), "base-devel", "multilib-devel") |
| 725 | res, err := cmd.CombinedOutput() |
| 726 | log.Debug(string(res)) |
| 727 | if err != nil { |
| 728 | return fmt.Errorf("error creating chroot: %w: %s", err, string(res)) |
| 729 | } |
| 730 | |
| 731 | // copy pacman.conf into pristine chroot to enable multilib |
| 732 | cmd = exec.CommandContext(ctx, sudoBin, "/usr/bin/cp", pacmanConf, //nolint:gosec |
| 733 | filepath.Join(conf.Basedir.Work, chrootDir, pristineChroot, "etc/pacman.conf")) |
| 734 | res, err = cmd.CombinedOutput() |
| 735 | log.Debug(string(res)) |
| 736 | if err != nil { |
| 737 | return fmt.Errorf("error copying pacman.conf to chroot: %w: %s", err, string(res)) |
| 738 | } |
| 739 | |
| 740 | // remove makepkg conf extension, they are covered by our custom makepkg |
| 741 | cmd = exec.CommandContext(ctx, sudoBin, rmChrootBin, //nolint:gosec |
| 742 | filepath.Join(conf.Basedir.Work, chrootDir, pristineChroot, "etc/makepkg.conf.d")) |
| 743 | res, err = cmd.CombinedOutput() |
| 744 | log.Debug(string(res)) |
| 745 | if err != nil { |
| 746 | return fmt.Errorf("error removing makepkg.conf.d from chroot: %w: %s", err, string(res)) |
| 747 | } |
no test coverage detected