We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec2d9cf commit a481737Copy full SHA for a481737
2 files changed
CHANGES/1284.bugfix
@@ -0,0 +1 @@
1
+Fix CLI explicitly creating a publication after package upload when repo has autopublish enabled
pulpcore/cli/rpm/content.py
@@ -401,7 +401,12 @@ def upload(
401
402
# Sanity: ignore publish|use_temp unless destination-repository has been specified
403
use_tmp = final_dest_repo_ctx and kwargs["use_temp_repository"]
404
- do_publish = final_dest_repo_ctx and kwargs["publish"]
+ # Publish if autopublish is not enabled on the repository
405
+ do_publish = (
406
+ final_dest_repo_ctx
407
+ and kwargs["publish"]
408
+ and not final_dest_repo_ctx.entity["autopublish"]
409
+ )
410
411
# Sanity: ignore relative_path if directory specified
412
if directory and kwargs["relative_path"]:
0 commit comments