Delta Update rootfs-image Provides field

Context: I am trying to use Mender to apply delta updates on a device that’s running, let’s say, software v 1.0 that was installed via a mender artifact. However, I am getting an error that’s along the lines of:
Artifact dependency "rootfs-image.checksum" not satisfied by currently installed artifact (b4ac741b018f28bec9538c4ba87cc18fcf2201b03d9eb2d0e5cf7b8bd9ff7df3 != <nil>).
Upon further inspection with mender-artifact read artifact_v1.0.mender:

Reading Artifact...
.............................................................. - 100 %
Mender artifact:
  Name: v1.0 artifact
  Format: mender
  Version: 2
  Signature: no signature
  Compatible devices: '[our_device]'
  State scripts:
    ArtifactInstall_Leave_80_bl-update

Updates:
    0:
    Type:   rootfs-image
    Provides: Nothing
    Depends: Nothing
    Metadata: Nothing
    Files:
      name:     our_v1.0_software.ext4
      size:     12992905216
      modified: 2023-02-10 23:24:35 +0000 UTC
      checksum: b4ac741b018f28bec9538c4ba87cc18fcf2201b03d9eb2d0e5cf7b8bd9ff7df3

The Provides: Nothing field concerns me since it might be the cause of the error above and because the documentation specifies that the rootfs-image artifcat should have a provides field matching the delta artifact’s depends.

+-------------------------------+
|Type:       rootfs-image       |
|Version:    v1                 |
|Checksum:   5bb84175           |
|                               |
|Provides                       |
|rootfs-image.checksum: 5bb84175|  -> matches the Depends for the delta
+-------------------------------+

I’ve tried mender-artifact modify --provides rootfs-image.checksum: b4ac741b018f28bec9538c4ba87cc18fcf2201b03d9eb2d0e5cf7b8bd9ff7df3 artifact_v1.0.mender to no avail. The Provides field is still empty. How can I get this provides field to show up in the rootfs-image artifact?

Hello @aqb,

I notice you are using an artifact that is actually using our version 2 and the Provides: Nothing is not populated. I assume the mender-binary update-module on the device side it is expecting it to be in version 3 while your generator is generating them in version 2. As this is a major bump, can I suggest to upgrade your mender-delta-generator to match the one running on the client side?

Have a nice day!
Luis

1 Like

We ended up noticing this as well. The only thing to note here is that the delta artifact was already running v3. What we needed to do was generate the rootfs-image with v3 of mender-artifact. For posterity, the version we used is 3.10.0.

Going forward, I have 2 suggestions -

  1. mender-artifact modify shouldn’t silently fail to modify the rootfs-image.checksum field. From the source code, it seems like the user should be able to modify this field. Maybe a warning that the field was not successfully updated with the reason why would be helpful.
  2. The Mender UI can be more clear and warn users about v2 and v3 possible incompatibility to help track this down faster.

Have a good one!

2 Likes