Skip to content

Commit a856a0a

Browse files
committed
rpm: Skip explicit publishing after package upload if repo has autopublish enabled
closes #1284 Signed-off-by: Balasankar 'Balu' C <balu@dravidam.net>
1 parent ec2d9cf commit a856a0a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES/1284.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix CLI explicitly creating a publication after package upload when repo has autopublish enabled

pulpcore/cli/rpm/content.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,8 @@ def upload(
401401

402402
# Sanity: ignore publish|use_temp unless destination-repository has been specified
403403
use_tmp = final_dest_repo_ctx and kwargs["use_temp_repository"]
404-
do_publish = final_dest_repo_ctx and kwargs["publish"]
404+
# Publish if autopublish is not enabled on the repository
405+
do_publish = final_dest_repo_ctx and kwargs["publish"] and not final_dest_repo_ctx.entity['autopublish']
405406

406407
# Sanity: ignore relative_path if directory specified
407408
if directory and kwargs["relative_path"]:

0 commit comments

Comments
 (0)