8000 Added backport fix for reposync by c4t3l · Pull Request #3227 · cobbler/cobbler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added backport fix for reposync #3227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
Diff view
Diff view
15 changes: 11 additions & 4 deletions cobbler/actions/reposync.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@ def rhn_sync(self, repo):
if repo.arch != "":
cmd = "%s -a %s" % (cmd, repo.arch)

if repo.arch == "":
cmd = "%s" % (cmd)

# Now regardless of whether we're doing yumdownloader or reposync or whether the repo was http://, ftp://, or
# rhn://, execute all queued commands here. Any failure at any point stops the operation.

Expand Down Expand Up @@ -537,7 +540,7 @@ def yum_sync(self, repo):
# Counter-intuitive, but we want the newish kernels too
cmd = "%s -a i686" % (cmd)
else:
cmd = "%s -a %s" % (cmd, repo.arch)
cmd = "%s -a %s -a noarch" % (cmd, repo.arch)

else:
# Create the output directory if it doesn't exist
Expand Down Expand Up @@ -570,12 +573,16 @@ def yum_sync(self, repo):
proxy = repo.proxy
(cert, verify) = self.gen_urlgrab_ssl_opts(repo.yumopts)

# FIXME: These two variables were deleted
repodata_path = ""
repomd_path = ""
repodata_path = os.path.join(temp_path, "repodata")
repomd_path = os.path.join(repodata_path, "repomd.xml")
if os.path.exists(repodata_path) and not os.path.isfile(repomd_path):
shutil.rmtree(repodata_path, ignore_errors=False, >

repodata_path = os.path.join(temp_path, "repodata")
if os.path.exists(repodata_path):
self.logger.info("Deleted old repo metadata for %s" % repodata_path)
shutil.rmtree(repodata_path, ignore_errors=False, >

h = librepo.Handle()
r = librepo.Result()
h.setopt(librepo.LRO_REPOTYPE, librepo.LR_YUMREPO)
Expand Down
0