mirror of
https://github.com/clearlinux/swupd-server.git
synced 2026-08-28 13:45:42 +00:00
04d2af2f64
There is an issue when two different files in a newer release have same hash: This is, when swupd updates a file by applying a delta, it takes the HASH2 to know the file where delta must be applyed. If files are different in current release (before updating), there must be 2 deltas, one for each file but as the two files have same hash in new release delta's name are the same: FROM-TO-HASH2 and it is when issue arises due to just the last delta file is kept when swupd server creates files and packs. So when swupd client tries to apply the delta to one of the file that does not corresponds it will fail and generates an error. At the first look it will seem like delta file is corrupted however the issue is that delta file was created for another file. To solve this issue we include the hash for the original file in the delta's name so that swupd client can take the correct delta and apply it: FROM-TO-HASH1-HASH2. Signed-off-by: Jose R Guzman <jose.r.guzman.mosqueda@intel.com> Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>