Details
-
Type:
Bug
-
Status: Done
-
Priority:
Higher
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.0.0
-
Labels:None
-
Sprint:MEN Sprint 85
-
Backlog:yes
Description
Affects mender-artifact v3.0.0b1
How to reproduce:
./mender-artifact write module-image -T dummy -n myname -t mydevice -f Makefile ./mender-artifact modify -n new artifact.mender Error selecting images for modification: can not process artifact: rename /tmp/mender-artifact113565709 /tmp: file exists
Following a bit in the code, the problem is that the functions unpackArtifact and repack in artifacts.go assume that the type is always rootfs-image
Other commands are showing similar problems for module-image Artifacts: cp and cat give a similar error as above, but rm command runs into a segfault:
./mender-artifact rm artifact.mender panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x629a1b] goroutine 1 [running]: main.Remove.func1(0x0, 0x0) /home/lluis/northern.work/mender-artifact/cli/mender-artifact/copy.go:172 +0x2b main.Remove(0xc4200d22c0, 0x6e6680, 0xc42000c8a0) /home/lluis/northern.work/mender-artifact/cli/mender-artifact/copy.go:190 +0x4af github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli.HandleAction(0x65fe60, 0x6c2aa0, 0xc4200d22c0, 0x0, 0xc4200ceb40) /home/lluis/go/src/github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli/app.go:501 +0xc8 github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli.Command.Run(0x6b0aff, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6bbd47, 0x26, 0x0, ...) /home/lluis/go/src/github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli/command.go:165 +0x47d github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli.(*App).Run(0xc4200ec000, 0xc420010180, 0x3, 0x3, 0x0, 0x0) /home/lluis/go/src/github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli/app.go:259 +0x6e8 main.run(0xc4200aa1e0, 0xc4200200b8) /home/lluis/northern.work/mender-artifact/cli/mender-artifact/main.go:399 +0x4b main.main() /home/lluis/northern.work/mender-artifact/cli/mender-artifact/main.go:44 +0x22