Fix six quality findings from iterative code review

- patch_ui.py: find_bundle now matches MARKER so already-patched files
  return early and print 'UI already patched' instead of the misleading
  'filterByProviders pattern not found' warning
- install.sh: scope warning grep to current run only (record log offset
  before apply.sh, tail -c +N to read only new bytes)
- install.sh: fix misleading 'before continuing' wording on warning banner
- install.sh: fix grep anchor (^WARNING: missed [truecloud-patch] WARNING: lines)
- uninstall.sh: add import-middlewared verification after Python detection,
  matching apply.sh fallback logic
This commit is contained in:
2026-06-15 15:53:06 +00:00
parent 0ce2083c71
commit cbd85af2a3
3 changed files with 14 additions and 1 deletions
+5
View File
@@ -84,11 +84,16 @@ fi
# ── Apply now ─────────────────────────────────────────────────────────────────
echo "Applying patches ..."
_log_start=$(wc -c < "$PATCH_DIR/apply.log" 2>/dev/null || echo 0)
bash "$PATCH_DIR/apply.sh"
echo ""
echo "Patch log ($PATCH_DIR/apply.log):"
tail -30 "$PATCH_DIR/apply.log"
echo ""
if tail -c "+$((_log_start + 1))" "$PATCH_DIR/apply.log" 2>/dev/null | grep -q "WARNING:"; then
echo "WARNING: apply.sh reported one or more issues — see log above for details."
echo ""
fi
# ── Restart middlewared ───────────────────────────────────────────────────────