1
0

Compare commits

..

No commits in common. "b32c09744689039b506f0a59f2a94f4b18aa55b9" and "20cd32243d817f854ad63c3eedb94b1d14731f83" have entirely different histories.

3 changed files with 18 additions and 16 deletions

View File

@ -203,7 +203,7 @@ jobs:
cp ../examples/kernel-module/{module.c,Makefile,test.sh} . cp ../examples/kernel-module/{module.c,Makefile,test.sh} .
../out-of-tree --log-level=debug kernel list-remote --distro-id=${{ matrix.os.distro }} --distro-release=${{ matrix.os.release }} ../out-of-tree --log-level=debug kernel list-remote --distro=${{ matrix.os.distro }} --ver=${{ matrix.os.release }}
../out-of-tree --log-level=debug kernel autogen --max=1 --shuffle ../out-of-tree --log-level=debug kernel autogen --max=1 --shuffle
../out-of-tree --log-level=debug pew --qemu-timeout=20m --include-internal-errors ../out-of-tree --log-level=debug pew --qemu-timeout=20m --include-internal-errors

View File

@ -265,8 +265,8 @@ func (cmd *KernelListCmd) Run(g *Globals) (err error) {
} }
type KernelListRemoteCmd struct { type KernelListRemoteCmd struct {
DistroID string `required:"" help:"distribution"` Distro string `required:"" help:"distribution"`
DistroRelease string `help:"distro version"` Ver string `help:"distro version"`
} }
func (cmd *KernelListRemoteCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) { func (cmd *KernelListRemoteCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) {
@ -279,13 +279,13 @@ func (cmd *KernelListRemoteCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error
container.UsePrebuilt = kernelCmd.PrebuiltContainers container.UsePrebuilt = kernelCmd.PrebuiltContainers
distroType, err := distro.NewID(cmd.DistroID) distroType, err := distro.NewID(cmd.Distro)
if err != nil { if err != nil {
return return
} }
km := artifact.Target{ km := artifact.Target{
Distro: distro.Distro{ID: distroType, Release: cmd.DistroRelease}, Distro: distro.Distro{ID: distroType, Release: cmd.Ver},
Kernel: artifact.Kernel{Regex: ".*"}, Kernel: artifact.Kernel{Regex: ".*"},
} }
@ -336,12 +336,12 @@ func (cmd *KernelAutogenCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) {
} }
type KernelGenallCmd struct { type KernelGenallCmd struct {
DistroID string `help:"distribution"` Distro string `help:"distribution"`
DistroRelease string `help:"distro version"` Ver string `help:"distro version"`
} }
func (cmd *KernelGenallCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) { func (cmd *KernelGenallCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) {
distroType, err := distro.NewID(cmd.DistroID) distroType, err := distro.NewID(cmd.Distro)
if err != nil { if err != nil {
return return
} }
@ -357,7 +357,7 @@ func (cmd *KernelGenallCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) {
continue continue
} }
if cmd.DistroRelease != "" && dist.Release != cmd.DistroRelease { if cmd.Ver != "" && dist.Release != cmd.Ver {
continue continue
} }
@ -376,13 +376,13 @@ func (cmd *KernelGenallCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) {
} }
type KernelInstallCmd struct { type KernelInstallCmd struct {
DistroID string `required:"" help:"distribution"` Distro string `required:"" help:"distribution"`
DistroRelease string `required:"" help:"distro version"` Ver string `required:"" help:"distro version"`
KernelRegex string `required:"" help:"kernel release mask"` Kernel string `required:"" help:"kernel release mask"`
} }
func (cmd *KernelInstallCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) { func (cmd *KernelInstallCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) {
distroType, err := distro.NewID(cmd.DistroID) distroType, err := distro.NewID(cmd.Distro)
if err != nil { if err != nil {
return return
} }
@ -390,8 +390,8 @@ func (cmd *KernelInstallCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error) {
kernel.SetSigintHandler(&kernelCmd.shutdown) kernel.SetSigintHandler(&kernelCmd.shutdown)
km := artifact.Target{ km := artifact.Target{
Distro: distro.Distro{ID: distroType, Release: cmd.DistroRelease}, Distro: distro.Distro{ID: distroType, Release: cmd.Ver},
Kernel: artifact.Kernel{Regex: cmd.KernelRegex}, Kernel: artifact.Kernel{Regex: cmd.Kernel},
} }
err = kernelCmd.Generate(g, km) err = kernelCmd.Generate(g, km)
if err != nil { if err != nil {

View File

@ -488,7 +488,9 @@ func (c Container) Run(workdir string, cmds []string) (out string, err error) {
err = cmd.Wait() err = cmd.Wait()
if err != nil { if err != nil {
flog.Error().Msg(out) e := fmt.Sprintf("error `%v` for cmd `%v` with output `%v`",
err, cmds, out)
err = errors.New(e)
return return
} }