Skip to content

Generates invalid appdata when change is a downgrade #36

@wjt

Description

@wjt

On flathub/us.zoom.Zoom#35 the checker correctly submitted an update to a newer version of Zoom. The rotating URL was then rolled back to the older version, and the checker dutifully opened flathub/us.zoom.Zoom#36. However, the latter PR prepended the new version to the appdata <releases>:

   <releases>
+    <release version="3.0.287250.0828" date="2019-08-29"/>
     <release version="3.0.291715.0908" date="2019-09-09"/>
     <release version="3.0.287250.0828" date="2019-08-29"/>

This is invalid:

Processing application us.zoom.Zoom
us.zoom.Zoom.desktop:              AppData problem: tag-invalid : <release> version was duplicated
us.zoom.Zoom.desktop:              AppData problem: tag-invalid : <release> versions are not in order [3.0.287250.0828 before 3.0.291715.0908]

Two changes suggest themselves:

  • Validate the generated appdata with appstream-util before sending the PR
  • Avoid generating this invalid change in the first place

The second could be done in a couple of ways:

  • The cheat's way to do it is to only include one <release> in <releases> and just update it every time the version changes. However, the Zoom appdata has been dutifully preserving the full release history since before this checker entered the scene.
  • The better approach would be to drop all <release> tags that do not compare older than the one we are about to prepend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions