Skip to content

Slot type "file" gets unexpectedly suffixed with ".img" #316

@mschwan-phytec

Description

@mschwan-phytec

Is there a specific reason why regular "file" slots have their filename get a .img appended?

imgname = "%s.%s" % (imgsource, "img")

This seems counter-intuitive to me, as I would expect for a slot with imgtype "file" to be left unmodified. This is the case for the imgtype "boot", but that does not fit e.g. file slots used for a user application. I could workaround this by specifying the rename slotflag, but this also looks weird:

RAUC_SLOT_appfs ?= "rauc-appfs-example"
RAUC_SLOT_appfs[type] ?= "file"
RAUC_SLOT_appfs[file] ?= "rauc-appfs-example.tar.gz"
# Current workaround with "rename" slotflag
#RAUC_SLOT_appfs[rename] ?= "rauc-appfs-example.tar.gz"

Without this workaround, my bundle has the following slot, which obviously fails to install:

  [appfs]
        Filename:  rauc-appfs-example.tar.gz.img
        Checksum:  d28d50cd859adc3e3ca14057f44e95549a4b9fa285cfaac0b431289e8f9c2a17
        Size:      220 bytes
        Hooks:

As a proper fix I would suggest simply assigning the imgsource to the resulting imgname:

-            imgname = "%s.%s" % (imgsource, "img")
+            imgname = imgsource

As an addition, I think we could add another imgtype called "image", which gets .img appended to the filename.

What do you think about this? I think we had a similar discussion about this elsewhere but couldn't find any issue describing the reasoning behind it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions