Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • L librem5-devkit-tools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Librem5
  • librem5-devkit-tools
  • Merge requests
  • !59

Immediately fail image verify if sizes don't match

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Hugo Grostabussiat requested to merge Bonstra/librem5-devkit-tools:check-size-in-addition-to-sha256 into master Jun 07, 2019
  • Overview 1
  • Commits 1
  • Pipelines 2
  • Changes 1

When verifying image integrity, first check the image file size against the one from the manifest. If they are different, fail immediately, without computing the SHA-256 hash of the image since we know it will be wrong.

Unfortunately, there is no speed gain to expect from this optimization in the common case, since the uncompressed size of the image rarely change between builds. However, in cases where there are remains of a partially downloaded image, a new download will be attempted almost immediately.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: check-size-in-addition-to-sha256