@@ -342,6 +342,15 @@ seed_legacy_plugin_dependency_debris() {
|
342 | 342 | assert_legacy_plugin_dependency_debris_present() { |
343 | 343 | plugin_deps_cleanup_enabled || return 0 |
344 | 344 | |
| 345 | +local found |
| 346 | + found="$(legacy_plugin_dependency_debris_count)" |
| 347 | +if [ "$found" -eq 0 ]; then |
| 348 | +echo "plugin-deps-cleanup scenario did not create legacy plugin dependency debris" >&2 |
| 349 | +return 1 |
| 350 | +fi |
| 351 | +} |
| 352 | + |
| 353 | +legacy_plugin_dependency_debris_count() { |
345 | 354 | local found=0 |
346 | 355 | local plugin |
347 | 356 | for plugin in $(plugin_deps_cleanup_plugins); do |
@@ -352,9 +361,18 @@ assert_legacy_plugin_dependency_debris_present() {
|
352 | 361 | fi |
353 | 362 | done < <(legacy_plugin_dependency_probe_paths "$plugin") |
354 | 363 | done |
355 | | -if [ "$found" -ne 1 ]; then |
356 | | -echo "plugin-deps-cleanup scenario did not create legacy plugin dependency debris" >&2 |
357 | | -return 1 |
| 364 | +printf '%s\n' "$found" |
| 365 | +} |
| 366 | + |
| 367 | +assert_legacy_plugin_dependency_debris_before_doctor() { |
| 368 | + plugin_deps_cleanup_enabled || return 0 |
| 369 | + |
| 370 | +local found |
| 371 | + found="$(legacy_plugin_dependency_debris_count)" |
| 372 | +if [ "$found" -eq 0 ]; then |
| 373 | +echo "Legacy plugin dependency debris was already removed before doctor; post-doctor cleanup assertion will verify it stays gone." |
| 374 | +else |
| 375 | +echo "Legacy plugin dependency debris survived update and will be cleaned by doctor." |
358 | 376 | fi |
359 | 377 | } |
360 | 378 | |
@@ -657,7 +675,7 @@ phase assert-baseline assert_baseline_state
|
657 | 675 | phase seed-legacy-runtime-deps-symlink seed_legacy_runtime_deps_symlink |
658 | 676 | phase resolve-candidate resolve_candidate_version |
659 | 677 | phase update-candidate update_candidate |
660 | | -phase assert-legacy-plugin-dependency-debris-before-doctor assert_legacy_plugin_dependency_debris_present |
| 678 | +phase assert-legacy-plugin-dependency-debris-before-doctor assert_legacy_plugin_dependency_debris_before_doctor |
661 | 679 | phase doctor run_doctor |
662 | 680 | phase assert-legacy-plugin-dependency-debris-cleaned assert_legacy_plugin_dependency_debris_cleaned |
663 | 681 | phase assert-legacy-runtime-deps-symlink-repaired assert_legacy_runtime_deps_symlink_repaired |
|