Skip to content

Commit ebe0e40

Browse files
committed
fix superfluous insufficient memory messages
1 parent f781521 commit ebe0e40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lilac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,11 @@ def try_pick_some(
332332

333333
ret: list[PkgToBuild] = []
334334

335+
limited_by_memory = False
335336
for pkg in ready_to_build:
336337
if (r := rusages.get(pkg)) and r.memory > memory_avail:
337338
logger.debug('package %s used %d memory last time, but now only %d is available', pkg, r.memory, memory_avail)
339+
limited_by_memory = True
338340
continue
339341

340342
to_build = check_buildability(pkg, repo, buildsorter, failed)
@@ -350,7 +352,7 @@ def try_pick_some(
350352
else:
351353
memory_avail -= 10 * 1024 ** 3
352354

353-
if not ret:
355+
if not ret and limited_by_memory:
354356
if starving:
355357
def sort_key(pkg):
356358
p = buildsorter.priority_func(pkg)

0 commit comments

Comments
 (0)