ota: increase re-use during updates

- use the latest stable release tag date for all files modification time
- tweak tar command tar to ignore read-errors (so missing files don't
  result in a failure to create the installation archive)
This commit is contained in:
Benoit Pierre
2025-05-30 00:23:52 +02:00
committed by Frans de Jonge
parent c7c5337e99
commit 633e5c8bd4
2 changed files with 3 additions and 1 deletions

View File

@@ -130,6 +130,7 @@ release_excludes = $(strip $(UPDATE_PATH_EXCLUDES:%='-x!$1%') $(UPDATE_GLOBAL_EX
define mkupdate
cd $(INSTALL_DIR) &&
'$(abspath tools/mkrelease.sh)'
--epoch="$$(git log -1 --format='%cs' "$$(git describe --tags | cut -d- -f1)")"
$(if $(PARALLEL_JOBS),--jobs $(PARALLEL_JOBS))
--manifest=$(or $2,koreader)/ota/package.index
$(foreach a,$1,'$(if $(filter --%,$a),$a,$(abspath $a))') $(or $2,koreader)

View File

@@ -307,8 +307,9 @@ function OTAManager:_buildLocalPackage()
local tar_cmd = {
'./tar',
'--create', '--file='..self.installed_package,
'--mtime', tostring(Version:getBuildDate()),
'--numeric-owner', '--owner=0', '--group=0',
'--no-recursion', '-C', '..',
'--ignore-failed-read', '--no-recursion', '-C', '..',
'--verbatim-files-from', '--files-from', self.package_indexfile,
}