Repository navigation
majestic-webui: the Live PTZ Suite goes with the rest of PTZ on images without a motor - #2904
Conversation
…s without a motor majestic-webui #722 added presets, Box PTZ, AF peaks and AF triggers to the Live page. Their scripts load only from p/motor.cgi, which the PTZ fixup already empties, and their CGIs only steer the motor or the autofocus, but the fixup did not know the new files, so every image without a motor carried them: about 30 KB of xz, which took the ssc377/ssc378 lite rootfs to 5144 KB of 5120 and failed those builds since the Nov 16 nightly. Remove them with the rest of PTZ. The settings page that reads af_triggers.cgi takes a failed request as no triggers. The note that sbin/updatewebui lists the same paths is dropped: it no longer does. Co-authored-by: OpenIPC AI team <ai@openipc.org>
PR Summary by QodoExclude Live PTZ Suite files from motorless WebUI images
AI Description
Merge Risk
|
Code Review by Qodo
1. A removed cross-repo contract note may let WebUI updates restore files
|
It does: the repo's sbin/updatewebui skips the PTZ files where the image has no motor driver. The dist tarball carries only a stub of it, which is what was read. Its list has ptz-orient.js, which the fixup lacked; the Live PTZ Suite files are missing from it too (Qodo review). Co-authored-by: OpenIPC AI team <ai@openipc.org>
|
/review |
|
Code review by qodo was updated up to the latest commit 9aef7c0 |
Problem
The ssc377, ssc377d, ssc377de, ssc377qe, ssc378de and ssc378qe lite builds fail on every PR:
The last nightly that published them is
4cc6476(Nov 15), with the ssc377d rootfs at 5108 KB. The Nov 16 nightly no longer had them.None of the firmware commits in between account for the growth. It comes from the web UI, which the build downloads from the
distrelease each time. OpenIPC/majestic-webui#722 (Live PTZ Suite, merged Nov 16) added presets, Box PTZ, AF peaks and AF triggers.MAJESTIC_WEBUI_PTZ_FIXUPdoesn't know these files, so they ship on every image without a motor:a/preview-ptz-presets.jscgi-bin/j/ptz_presets.cgia/preview-af-peaks.jsa/preview-box-ptz.jscgi-bin/j/box_ptz.cgicgi-bin/j/af_candidates.cgicgi-bin/p/ptz_common.shcgi-bin/j/af_triggers.cgiComparison of the ssc377d web tree after the fixups (no PTZ/SMS/counting/FPV), as xz squashfs at 128K blocks:
dist: 416 KBdistwith this change: 388 KBmajestic itself grew by 116 bytes over the same period.
Change
Add the eight files to
MAJESTIC_WEBUI_PTZ_FIXUP.p/motor.cgi, which the fixup already empties.preview-ptz.js, which is already removed.ptz_common.shis sourced only by the PTZ CGIs.af_triggers.cgiand takes a failed request as no triggers.Images with
BR2_PACKAGE_MAJESTIC_WEBUI_PTZ(gpio-motors or majestic-af) are unaffected.The comment saying
sbin/updatewebuilists the same paths is dropped: the currentupdatewebuino longer does.Note
That estimate leaves ssc377d at about 5116 of 5120 KB, so the next few KB of growth will break it again.
a/mj-settings.jsalone grew 11 KB in #722 and #727.