Fix mirror label: every template contains {img}
The containment check ('{img}' in template) matched ALL entries, so
every announce said 'via docker.io(daemon mirrors)' while the chain
silently rotated real mirrors. The daemon-default entry is exactly
'{img}' -- compare equality.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
869d2c41fb
commit
cfc1f2904e
@ -115,7 +115,11 @@ def _pull_one(image: str, verbose: bool = True) -> None:
|
|||||||
for template in _CN_MIRROR_FALLBACKS:
|
for template in _CN_MIRROR_FALLBACKS:
|
||||||
ref = template.format(img=image)
|
ref = template.format(img=image)
|
||||||
if verbose:
|
if verbose:
|
||||||
src = 'docker.io(daemon mirrors)' if '{img}' in template else template.split('/{img}')[0]
|
# the daemon-default entry IS exactly '{img}'; every real
|
||||||
|
# mirror template also CONTAINS '{img}' -- the old containment
|
||||||
|
# check matched both and labeled everything docker.io
|
||||||
|
src = ('docker.io (daemon mirrors)' if template.strip() == '{img}'
|
||||||
|
else template.split('/{img}')[0])
|
||||||
print(f'· pulling sandbox image {image} via {src} ...',
|
print(f'· pulling sandbox image {image} via {src} ...',
|
||||||
file=_sys.stderr, flush=True)
|
file=_sys.stderr, flush=True)
|
||||||
t0 = _time.monotonic()
|
t0 = _time.monotonic()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user