From: David Shea dshea@redhat.com
Make use of --cost, --includepkgs and --excludepkgs, and save --includepkgs and --excludepkgs to the installed repo file. --- pyanaconda/packaging/dnfpayload.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py index 608a636..c24aaf1 100644 --- a/pyanaconda/packaging/dnfpayload.py +++ b/pyanaconda/packaging/dnfpayload.py @@ -255,6 +255,15 @@ def _add_repo(self, ksrepo): log.error("Failed to parse proxy for _add_repo %s: %s", ksrepo.proxy, e)
+ if ksrepo.cost: + repo.cost = ksrepo.cost + + if ksrepo.includepkgs: + repo.include = ksrepo.includepkgs + + if ksrepo.excludepkgs: + repo.exclude = ksrepo.excludepkgs + # If this repo is already known, it's one of two things: # (1) The user is trying to do "repo --name=updates" in a kickstart file # and we should just know to enable the already existing on-disk @@ -874,6 +883,12 @@ def _writeDNFRepo(self, repo, repo_path): if ks_repo.cost: f.write("cost=%d\n" % ks_repo.cost)
+ if ks_repo.includepkgs: + f.write("include=%s\n" % ",".join(ks_repo.includepkgs)) + + if ks_repo.excludepkgs: + f.write("exclude=%s\n" % ",".join(ks_repo.excludepkgs)) + def postInstall(self): """ Perform post-installation tasks. """ # Write selected kickstart repos to target system