bintree: verify that default REPO is legit
authorZac Medico <zmedico@gentoo.org>
Sat, 11 Jun 2011 03:38:02 +0000 (20:38 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 11 Jun 2011 03:38:02 +0000 (20:38 -0700)
We need to check the RepoConfig.missing_repo_name attribute to make
sure the repo_name is really defined.

pym/portage/dbapi/bintree.py

index 7af152cd7e96d92a937bc67707ac68a8e38523db..36bf735f60ed64154c3e0ca474765ebe184e00f0 100644 (file)
@@ -284,7 +284,7 @@ class binarytree(object):
                        # pkgindex header already defines these keys, then
                        # they will appropriately override our defaults.
                        main_repo = self.settings.repositories.mainRepo()
-                       if main_repo is not None:
+                       if main_repo is not None and not main_repo.missing_repo_name:
                                self._pkgindex_default_header_data["repository"] = \
                                        main_repo.name