@@ -77,7 +77,7 @@ def _install_dependencies(self, *, update: bool = False) -> None:
77
77
If False, use cached versions when available.
78
78
"""
79
79
operation = 'update' if update else 'install'
80
-
80
+
81
81
try :
82
82
# Setup environment and generate conanfile
83
83
conan_api , conanfile_path = self ._prepare_installation ()
@@ -247,6 +247,7 @@ def publish(self) -> None:
247
247
raise FileNotFoundError (f'conanfile.py not found at { conanfile_path } ' )
248
248
249
249
conan_api = ConanAPI ()
250
+
250
251
all_remotes = conan_api .remotes .list ()
251
252
252
253
# Configure remotes for upload
@@ -272,7 +273,7 @@ def publish(self) -> None:
272
273
user = None ,
273
274
channel = None ,
274
275
lockfile = None ,
275
- remotes = all_remotes ,
276
+ remotes = all_remotes , # Use all remotes for dependency resolution
276
277
update = None ,
277
278
check_updates = False ,
278
279
is_build_require = False ,
@@ -284,22 +285,31 @@ def publish(self) -> None:
284
285
conan_api .graph .analyze_binaries (
285
286
graph = deps_graph ,
286
287
build_mode = ['*' ],
287
- remotes = all_remotes ,
288
+ remotes = all_remotes , # Use all remotes for dependency resolution
288
289
update = None ,
289
290
lockfile = None ,
290
291
)
291
292
292
293
conan_api .install .install_binaries (deps_graph = deps_graph , remotes = all_remotes )
293
294
294
- # Upload if not local only
295
- if not self .data .local_only :
295
+ if not self .data .skip_upload :
296
296
self ._upload_package (conan_api , ref , configured_remotes )
297
297
298
298
def _get_configured_remotes (self , all_remotes ):
299
- """Get and validate configured remotes for upload."""
300
- if self .data .local_only :
299
+ """Get and validate configured remotes for upload.
300
+
301
+ Note: This only affects upload behavior. For dependency resolution,
302
+ we always use all available system remotes regardless of this config.
303
+ """
304
+ # If skip_upload is True, don't upload anywhere
305
+ if self .data .skip_upload :
301
306
return []
302
307
308
+ # If no remotes specified, upload to all available remotes
309
+ if not self .data .remotes :
310
+ return all_remotes
311
+
312
+ # Otherwise, upload only to specified remotes
303
313
configured_remotes = [remote for remote in all_remotes if remote .name in self .data .remotes ]
304
314
305
315
if not configured_remotes :
0 commit comments