Skip to content

Commit f17d248

Browse files
committed
fix: Update 1 code files
Hoist sync marker check before all install checks in _check_sync_status_ultra_fast so interpreters with a valid .omnipkg_synced_<version> marker short-circuit immediately, preventing repeated spurious syncs for Python 3.7 whose editable install leaves no dist-info or pth artifacts. Also remove premature gatherer call in _synchronize_knowledge_base_with_reality auto-heal branch where gatherer was not yet initialized (UnboundLocalError). Modified: • src/omnipkg/core.py (+8/-11 lines) [gitship-generated]
1 parent 2f1684e commit f17d248

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

src/omnipkg/core.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6853,15 +6853,15 @@ def _check_sync_status_ultra_fast(self, master_version: str) -> List[Tuple[str,
68536853
if p.name not in (expected_dist_info, expected_editable_dist_info)
68546854
]
68556855

6856+
_marker = Path(exe_path).parent / f".omnipkg_synced_{master_version}"
6857+
if _marker.exists():
6858+
# Marker present — already synced at this version, skip all checks
6859+
continue
6860+
68566861
has_egg_link = (site_packages / "omnipkg.egg-link").exists()
68576862
if has_egg_link:
6858-
_marker = Path(exe_path).parent / f".omnipkg_synced_{master_version}"
6859-
if _marker.exists():
6860-
# Already synced, egg-link is stale but harmless — skip
6861-
pass
6862-
else:
6863-
sync_needed.append((py_ver, str(exe_path)))
6864-
continue
6863+
sync_needed.append((py_ver, str(exe_path)))
6864+
continue
68656865

68666866
# If we found an old/conflicting .dist-info directory, sync is ALWAYS needed.
68676867
# This is non-negotiable and overrides any .pth file check.
@@ -8276,10 +8276,7 @@ def _synchronize_knowledge_base_with_reality(
82768276
# ── Fast missing-METADATA scan (main env + bubbles) ──────────────
82778277
if self._fast_missing_metadata_check():
82788278
safe_print(" 🔧 Auto-healed broken metadata, re-running discovery...")
8279-
# Force fresh discovery after healing
8280-
all_discovered_dists = gatherer._discover_distributions(
8281-
targeted_packages=None, verbose=False
8282-
)
8279+
# Auto-heal done; discovery runs below
82838280
safe_print(_("🧠 Checking knowledge base synchronization..."))
82848281

82858282
configured_python_exe = self.config.get("python_executable", sys.executable)

0 commit comments

Comments
 (0)