Bug #484730: In sync mode, use repos.conf section name when repo_name file is missing.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Fri, 13 Sep 2013 09:11:22 +0000 (11:11 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Fri, 13 Sep 2013 09:11:22 +0000 (11:11 +0200)
pym/portage/repository/config.py

index 4c4a2ebaec05231dd43d5e599aceada57d613ff9..6ab30655ffaddf4cae6bf19052732977a7373ef8 100644 (file)
@@ -176,11 +176,11 @@ class RepoConfig(object):
                missing = True
                self.name = name
                if self.location is not None:
-                       if os.path.isdir(location):
-                               eapi = read_corresponding_eapi_file(os.path.join(self.location, REPO_NAME_LOC))
-                               self.name, missing = self._read_valid_repo_name(self.location)
-                       else:
-                               missing = not portage._sync_disabled_warnings
+                       eapi = read_corresponding_eapi_file(os.path.join(self.location, REPO_NAME_LOC))
+                       self.name, missing = self._read_valid_repo_name(self.location)
+                       if missing and portage._sync_disabled_warnings:
+                               self.name = name
+                               missing = False
                elif name == "DEFAULT":
                        missing = False