[lorax 7/7] Skip using srpm repos

Brian C. Lane bcl at redhat.com
Wed Feb 11 18:40:12 UTC 2015


DNF has a bug (#1191289) when the SRPM repo isn't the first one used,
and we don't need them for lorax anyway.
---
 src/sbin/lorax | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/sbin/lorax b/src/sbin/lorax
index 6e76c2f..28b9b2f 100755
--- a/src/sbin/lorax
+++ b/src/sbin/lorax
@@ -291,6 +291,9 @@ def get_dnf_base_object(installroot, repositories, mirrorlists=None,
 
     # add the repositories
     for i, r in enumerate(repositories):
+        if "SRPM" in r or "srpm" in r:
+            log.info("Skipping source repo: %s" % r)
+            continue
         repo_name = "lorax-repo-%d" % i
         repo = dnf.repo.Repo(repo_name, cachedir)
         repo.baseurl = [r]
@@ -308,6 +311,9 @@ def get_dnf_base_object(installroot, repositories, mirrorlists=None,
 
     # add the mirrorlists
     for i, r in enumerate(mirrorlists):
+        if "SRPM" in r or "srpm" in r:
+            log.info("Skipping source repo: %s" % r)
+            continue
         repo_name = "lorax-mirrorlist-%d" % i
         repo = dnf.repo.Repo(repo_name, cachedir)
         repo.mirrorlist = r
-- 
2.1.0



More information about the anaconda-patches mailing list