Skip to content

Commit

Permalink
Update yum-sync.py to match tools in dokcer image
Browse files Browse the repository at this point in the history
Thanks to Hongren Zheng.

Signed-off-by: Shengqi Chen <[email protected]>
  • Loading branch information
Harry-Chen committed Dec 2, 2023
1 parent 6020ee7 commit 1d16b9d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions yum-sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,11 @@ def combination_os_comp(arch: str):
failed.append(('', arch))
continue

cmd_args = ["reposync", "-a", arch, "-c", conf.name, "-d", "-p", str(args.working_dir.absolute()), "-e", cache_dir]
print("Launching reposync", flush=True)
cmd_args = [
"dnf", "reposync",
"-a", arch, "-c", conf.name,
"--delete", "-p", str(args.working_dir.absolute())]
print("Launching dnf reposync", flush=True)
# print(cmd_args)
ret = sp.run(cmd_args)
if ret.returncode != 0:
Expand All @@ -234,7 +237,7 @@ def combination_os_comp(arch: str):
if args.download_repodata:
download_repodata(url, path)
else:
cmd_args = ["createrepo", "--update", "-v", "-c", cache_dir, "-o", str(path), str(path)]
cmd_args = ["createrepo_c", "--update", "-v", "-c", cache_dir, "-o", str(path), str(path)]
# print(cmd_args)
ret = sp.run(cmd_args)
calc_repo_size(path)
Expand Down

0 comments on commit 1d16b9d

Please sign in to comment.