Fix extraction of kernel from ISO 93/493/1
authorFrank A. Zdarsky <fzdarsky@redhat.com>
Tue, 19 Mar 2019 23:27:22 +0000 (00:27 +0100)
committerFrank A. Zdarsky <fzdarsky@redhat.com>
Tue, 19 Mar 2019 23:31:11 +0000 (00:31 +0100)
Extraction of vmlinuz and initramfs.img from ISO failed because
newer ISOs store those in /images instead of /. Fixed location.

Change-Id: I6ce246fa0a212b38d72e969d6f53ca2d6556e5dc

cmd/images.go

index 2763d2f..bc74143 100644 (file)
@@ -75,7 +75,7 @@ func ExtractIsoFiles(isoPath string, buildPath string) {
        }
 
        // copy the images to the build directory
-       cmd = exec.Command("cp", fmt.Sprintf("%s/vmlinuz", mountPath), buildPath)
+       cmd = exec.Command("cp", fmt.Sprintf("%s/images/vmlinuz", mountPath), buildPath)
        cmd.Dir = buildPath
        out, err = cmd.CombinedOutput()
        if err != nil {
@@ -84,7 +84,7 @@ func ExtractIsoFiles(isoPath string, buildPath string) {
                os.Exit(1)
        }
 
-       cmd = exec.Command("cp", fmt.Sprintf("%s/initramfs.img", mountPath), buildPath)
+       cmd = exec.Command("cp", fmt.Sprintf("%s/images/initramfs.img", mountPath), buildPath)
        cmd.Dir = buildPath
        out, err = cmd.CombinedOutput()
        if err != nil {