Skip main-repo warn if PORTDIR unset, bug #470006
authorZac Medico <zmedico@gentoo.org>
Thu, 22 Aug 2013 16:22:22 +0000 (09:22 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 22 Aug 2013 16:22:22 +0000 (09:22 -0700)
pym/portage/repository/config.py

index 7b49eea7a61890e64ca7f81526440489d9e01f77..4c4a2ebaec05231dd43d5e599aceada57d613ff9 100644 (file)
@@ -694,7 +694,7 @@ class RepoConfigLoader(object):
                                prepos['DEFAULT'].main_repo = main_repo
                        else:
                                prepos['DEFAULT'].main_repo = None
-                               if not portage._sync_disabled_warnings:
+                               if portdir and not portage._sync_disabled_warnings:
                                        writemsg(_("!!! main-repo not set in DEFAULT and PORTDIR is empty.\n"), noiselevel=-1)
 
                if main_repo is not None and prepos[main_repo].priority is None: