fus: List lookaside repos first
This works around a bug where fus prioritizes first repo and thus could include packages even if they were in lookaside. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
604ec40c8e
commit
1bff5ccfa2
@ -36,10 +36,12 @@ def get_cmd(
|
||||
):
|
||||
cmd = ["fus", "--verbose", "--arch", arch]
|
||||
|
||||
for idx, repo in enumerate(repos):
|
||||
cmd.append("--repo=repo-%s,repo,%s" % (idx, _prep_path(repo)))
|
||||
# Lookaside repos should be first. If the same package is present in
|
||||
# multiple repos, libsolv gives priority to the first repo.
|
||||
for idx, repo in enumerate(lookasides):
|
||||
cmd.append("--repo=lookaside-%s,lookaside,%s" % (idx, _prep_path(repo)))
|
||||
for idx, repo in enumerate(repos):
|
||||
cmd.append("--repo=repo-%s,repo,%s" % (idx, _prep_path(repo)))
|
||||
|
||||
if platform:
|
||||
cmd.append("--platform=%s" % platform)
|
||||
|
@ -37,10 +37,10 @@ class TestGetCmd(unittest.TestCase):
|
||||
"--verbose",
|
||||
"--arch",
|
||||
"x86_64",
|
||||
"--repo=repo-0,repo,/tmp/first",
|
||||
"--repo=repo-1,repo,/tmp/second",
|
||||
"--repo=lookaside-0,lookaside,/tmp/fst",
|
||||
"--repo=lookaside-1,lookaside,/tmp/snd",
|
||||
"--repo=repo-0,repo,/tmp/first",
|
||||
"--repo=repo-1,repo,/tmp/second",
|
||||
"--platform=f29",
|
||||
"module(mod:1.0)",
|
||||
"pkg",
|
||||
|
Loading…
Reference in New Issue
Block a user