From 2147984862c83f5214404d491646ed365df5a59b Mon Sep 17 00:00:00 2001 From: "Bernd (Hermes)" Date: Sun, 9 Aug 2026 20:31:14 +0200 Subject: [PATCH] =?UTF-8?q?P-043c:=20install.sh=20=E2=80=94=20venv/=20+=20?= =?UTF-8?q?.pytest=5Fcache/=20vom=20Deployment=20ausschlie=C3=9Fen=20(~200?= =?UTF-8?q?MB=20Bloat)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f4bb717..12be8c3 100755 --- a/install.sh +++ b/install.sh @@ -417,12 +417,13 @@ deploy_plugin() { # Rekursives Kopieren, __pycache__/*.pyc + Stray ~/ ausschließen # Erkenntnis 3: Stray-Verzeichnis ~/ im Dev-Repo ausschließen # Erkenntnis 4: find+cp statt tar (zuverlässigere Excludes) + # P-043c: venv/ + .pytest_cache/ ausschließen (Dev-Artefakte, ~200MB Bloat) while read -r f; do rel="${f#$src/}" target="$dst/$rel" mkdir -p "$(dirname "$target")" cp "$f" "$target" - done < <(find "$src" -type f ! -path '*/__pycache__/*' ! -name '*.pyc' ! -path '*/~/*') + done < <(find "$src" -type f ! -path '*/__pycache__/*' ! -name '*.pyc' ! -path '*/~/*' ! -path '*/venv/*' ! -path '*/.pytest_cache/*') # pycache aufräumen find "$dst" -name '__pycache__' -type d -exec rm -rf {} + 2>/dev/null || true @@ -533,7 +534,7 @@ migrate_to_userspace() { target="$user_dst/$rel" mkdir -p "$(dirname "$target")" cp "$f" "$target" - done < <(find "$bundled_src" -type f ! -path '*/__pycache__/*' ! -name '*.pyc') + done < <(find "$bundled_src" -type f ! -path '*/__pycache__/*' ! -name '*.pyc' ! -path '*/venv/*' ! -path '*/.pytest_cache/*') ok "Plugin-Inhalt kopiert ($(find "$user_dst" -type f ! -path '*/__pycache__/*' | wc -l) Dateien)" # c) Alten Bundled-Pfad leeren (NICHT das Verzeichnis selbst löschen) @@ -1646,6 +1647,20 @@ if $UPDATE_ONLY; then rm -rf "$HOME/.hermes/plugins/rocketchat" log "Stale ~/.hermes/plugins/rocketchat/ gelöscht (alter falscher Pfad)" fi + + # P-043c: Stale venv/ + .pytest_cache/ aus altem Deploy bereinigen + if [ -d "$_update_dst/archivar/venv" ]; then + rm -rf "$_update_dst/archivar/venv" + log "Stale archivar/venv/ gelöscht (P-043c: Dev-Artefakt, ~200MB)" + fi + if [ -d "$_update_dst/.pytest_cache" ]; then + rm -rf "$_update_dst/.pytest_cache" + log "Stale .pytest_cache/ gelöscht (P-043c)" + fi + if [ -d "$_update_dst/archivar/.pytest_cache" ]; then + rm -rf "$_update_dst/archivar/.pytest_cache" + log "Stale archivar/.pytest_cache/ gelöscht (P-043c)" + fi else printf '%s[dry]%s find %s -type d -name __pycache__ -exec rm -rf {} +\n' "$C_YELLOW" "$C_RESET" "$_update_dst" fi