[PATCH 3/3] Add a property to return the id of the base repo.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/packaging/yumpayload.py |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 350a5e4..03085e3 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -144,9 +144,20 @@ reposdir=/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/t
     ###
     @property
     def repos(self):
-        # FIXME: should this return pykickstart Repo or YumRepo?
         return self._yum.repos.repos.keys()
 
+    @property
+    def baseRepo(self):
+        repo_names = [BASE_REPO_NAME, productName.lower(), "rawhide"]
+        base_repo_name = None
+        for repo_name in repo_names:
+            if repo_name in self.repos and \
+               self._yum.repos.getRepo(repo_name).enabled:
+                base_repo_name = repo_name
+                break
+
+        return base_repo_name
+
     def _repoNeedsNetwork(self, repo):
         """ Returns True if the ksdata repo requires networking. """
         urls = [repo.baseurl] + repo.mirrorlist
-- 
1.7.9.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux