Skip to content

Commit 711e75b

Browse files
committed
packages - work from commit date rather than authored date
This is used for our package information, although it's not used to check for newer versions as we only check the remote hash of a git repository for updates. We also used this for checking if we need to update a binary based on the last date of a change to the module file. However as we were using author date, if a binary was built before the change was accepted, but more recently than the change was authored, it wouldn't trigger a binary rebuild. It makes more sense to use the date the commit was made rather than when it was authored in both cases, as we want to know when something was last changed in the repository rather than the date of the change.
1 parent 19cff6b commit 711e75b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scriptmodules/packages.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ function rp_hasNewerModule() {
643643
local vendor="${__mod_info[$id/vendor]}"
644644
local repo_dir="$scriptdir"
645645
[[ "$vendor" != "RetroPie" ]] && repo_dir+="/ext/$vendor"
646-
local module_date="$(git -C "$repo_dir" log -1 --format=%aI -- "${__mod_info[$id/path]}")"
646+
local module_date="$(git -C "$repo_dir" log -1 --format=%cI -- "${__mod_info[$id/path]}")"
647647
if rp_dateIsNewer "$pkg_date" "$module_date"; then
648648
ret=0
649649
fi
@@ -790,7 +790,7 @@ function rp_setPackageInfo() {
790790
local repo_dir="${__mod_info[$id/repo_dir]}"
791791
[[ -z "$repo_dir" ]] && repo_dir="$md_build"
792792
# date cannot understand the default date format of git
793-
pkg_repo_date="$(git -C "$repo_dir" log -1 --format=%aI)"
793+
pkg_repo_date="$(git -C "$repo_dir" log -1 --format=%cI)"
794794
pkg_repo_commit="$(git -C "$repo_dir" log -1 --format=%H)"
795795
else
796796
pkg_repo_date="$(svn info . | grep -oP "Last Changed Date: \K.*")"

0 commit comments

Comments
 (0)