[master 1/3] Implement the rest of the repo options in dnfpayload.
dashea
installerbot-noreply at redhat.com
Fri Jul 31 18:39:31 UTC 2015
From: David Shea <dshea at 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
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/cdeb866bb3c1421d7b5c48830506cc7ba69861ca
More information about the anaconda-patches
mailing list