Skip to content

Commit

Permalink
correct package app status refresh for first boot
Browse files Browse the repository at this point in the history
fixes bug introduced by 3d8b3e0 . the issue the runonce was trying to workaround was already resolved in 8813df9 (now slightly modified since then, but still achieving the same result).

this was the root cause for the possibility of duplicated shlink clicks on first boot for already installed package apps.

in addition, make refresh_all_pkgapp_status blocking for the preload-daemon since it is much faster than it once was. this will result in the generated listfiles always being up to date.
  • Loading branch information
theofficialgman committed Sep 3, 2024
1 parent 382bbe9 commit 945cc23
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion etc/preload-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fi
if [ "$(stat -c %Y /var/lib/dpkg/status 2>/dev/null)" != "$(cat "${DIRECTORY}/data/preload/timestamps-dpkg-status" 2>/dev/null)" ];then
echo "Refreshing pkgapp_status..." 1>&2
stat -c %Y /var/lib/dpkg/status 2>/dev/null > "${DIRECTORY}/data/preload/timestamps-dpkg-status"
refresh_all_pkgapp_status &
refresh_all_pkgapp_status
fi

#get modified timestamps for files/directories in the pi-apps folder
Expand Down
10 changes: 0 additions & 10 deletions etc/runonce-entries
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@ runonce <<"EOF"
fi
EOF

#regenerate package-app status for one-time migration
runonce <<"EOF"
IFS=$'\n'
for app in $(list_apps package) ;do
rm -f "${DIRECTORY}/data/status/${app}" || exit 1
done
refresh_all_pkgapp_status
EOF

# remove deprecated apps (only when running in a visible terminal)
case $(ps -o stat= -p $$) in
*+*) # Running in foreground
Expand Down

0 comments on commit 945cc23

Please sign in to comment.