@@ -210,17 +210,23 @@ async def _find_latest_versions(
210
210
211
211
def find_latest_releases (
212
212
configuration : Configuration ,
213
- blueprints : list [Blueprint ],
214
213
fetcher : Fetcher ,
215
214
skip_names : list [str ] | None ,
216
215
only_names : list [str ] | None ,
217
216
) -> Tuple [list [LatestRelease ], list [Ops2debError ]]:
218
- blueprints = [b for b in blueprints if b .fetch is not None ]
217
+ blueprints = [b for b in configuration . blueprints if b .fetch is not None ]
219
218
if skip_names :
220
219
blueprints = [b for b in blueprints if b .name not in skip_names ]
221
220
if only_names :
222
221
blueprints = [b for b in blueprints if b .name in only_names ]
223
222
223
+ # when multiple blueprints have the same name, only look for new releases for the
224
+ # last one in the list
225
+ blueprints_by_name : dict [str , Blueprint ] = {}
226
+ for blueprint in blueprints :
227
+ blueprints_by_name [blueprint .name ] = blueprint
228
+ blueprints = list (blueprints_by_name .values ())
229
+
224
230
# find new releases for the selected list of blueprints
225
231
releases , errors = asyncio .run (_find_latest_versions (blueprints ))
226
232
@@ -303,9 +309,8 @@ def update(
303
309
max_versions : int = 1 ,
304
310
) -> None :
305
311
logger .title ("Looking for new releases..." )
306
- blueprints = list (configuration .blueprints )
307
312
releases , errors = find_latest_releases (
308
- configuration , blueprints , fetcher , skip_names , only_names
313
+ configuration , fetcher , skip_names , only_names
309
314
)
310
315
311
316
summary : list [str ] = []
0 commit comments