From aad7a8ab146ac9c8c1cc3ed178a09a63212ce033 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 17 Jan 2024 14:36:23 +0000 Subject: [PATCH] Revert #64929 since it's not working as intended See https://github.com/saltstack/salt/actions/runs/7554867564/job/20574453603#step:11:123 Signed-off-by: Pedro Algarvio --- tools/pkg/repo/create.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/tools/pkg/repo/create.py b/tools/pkg/repo/create.py index f307bd9dbc7..bc36463bbf6 100644 --- a/tools/pkg/repo/create.py +++ b/tools/pkg/repo/create.py @@ -285,11 +285,7 @@ def debian( ctx.info(f"Running '{' '.join(cmdline)}' ...") ctx.run(*cmdline, cwd=create_repo_path) - if nightly_build_from: - nightly_link = create_repo_path.parent / "minor/latest" - ctx.info(f"Creating '{nightly_link.relative_to(repo_path)}' symlink ...") - nightly_link.symlink_to(f"minor/{salt_version}") - else: + if not nightly_build_from: remote_versions = _get_remote_versions( tools.utils.STAGING_BUCKET_NAME, create_repo_path.parent.relative_to(repo_path), @@ -482,12 +478,10 @@ def rpm( if salt_repo_user and salt_repo_pass: repo_domain = f"{salt_repo_user}:{salt_repo_pass}@{repo_domain}" - def _create_repo_file(create_repo_path, url_suffix, nightly_path=None): + def _create_repo_file(create_repo_path, url_suffix): ctx.info(f"Creating '{repo_file_path.relative_to(repo_path)}' file ...") if nightly_build_from: - if nightly_path is None: - nightly_path = datetime.utcnow().strftime("%Y-%m-%d") - base_url = f"salt-dev/{nightly_build_from}/{nightly_path}/" + base_url = f"salt-dev/{nightly_build_from}/{datetime.utcnow().strftime('%Y-%m-%d')}/" repo_file_contents = "[salt-nightly-repo]" elif "rc" in salt_version: base_url = "salt_rc/" @@ -529,14 +523,7 @@ def rpm( _create_repo_file(repo_file_path, f"minor/{salt_version}") - if nightly_build_from: - nightly_latest_repo_file_path = create_repo_path.parent / "nightly_latest.repo" - _create_repo_file(nightly_latest_repo_file_path, "minor/latest", "latest") - - nightly_link = create_repo_path.parent / "minor/latest" - ctx.info(f"Creating '{nightly_link.relative_to(repo_path)}' symlink ...") - nightly_link.symlink_to(f"minor/{salt_version}") - else: + if not nightly_build_from: remote_versions = _get_remote_versions( tools.utils.STAGING_BUCKET_NAME, create_repo_path.parent.relative_to(repo_path),