tao-shen Claude Opus 4.6 commited on
Commit
b56f91e
·
1 Parent(s): 0db5b04

fix: use apt --reinstall to handle restored dpkg state

Browse files

Restoring /var/lib/dpkg/ makes apt think packages are installed when
the actual binaries are not synced. Use --reinstall to force.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. entrypoint.py +1 -1
entrypoint.py CHANGED
@@ -157,7 +157,7 @@ def restore():
157
  to_install = sorted(saved - base)
158
  if to_install:
159
  log(f"── RESTORE: apt install {len(to_install)} packages")
160
- rc, _ = sh(f"apt-get update -qq && apt-get install -y --no-install-recommends {' '.join(to_install)}")
161
  if rc == 0:
162
  log(f" packages restored")
163
  else:
 
157
  to_install = sorted(saved - base)
158
  if to_install:
159
  log(f"── RESTORE: apt install {len(to_install)} packages")
160
+ rc, _ = sh(f"apt-get update -qq && apt-get install -y --reinstall --no-install-recommends {' '.join(to_install)}")
161
  if rc == 0:
162
  log(f" packages restored")
163
  else: