Fix merge list repo display breakage.
authorZac Medico <zmedico@gentoo.org>
Thu, 23 Dec 2010 18:44:04 +0000 (10:44 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 23 Dec 2010 18:44:04 +0000 (10:44 -0800)
Broken since refactoring in commit
48c8cec7c079cb07a4f421a36cdc46a7fdbc7811.

pym/_emerge/resolver/output.py
pym/_emerge/resolver/output_helpers.py

index af8b9401e9fa00d9ae239b95dca83624f5595a57..502aaeed72f5f7b0d65eb9a18a9a15fdb9823729 100644 (file)
@@ -326,7 +326,7 @@ class Display(object):
 
                # now use the data to generate output
                if pkg.installed or not slot_matches:
-                       repoadd = self.conf.repo_display.repoStr(
+                       self.repoadd = self.conf.repo_display.repoStr(
                                pkg_info.repo_path_real)
                else:
                        repo_path_prev = None
@@ -334,14 +334,14 @@ class Display(object):
                                repo_path_prev = self.portdb.getRepositoryPath(
                                        repo_name_prev)
                        if repo_path_prev == pkg_info.repo_path_real:
-                               repoadd = self.conf.repo_display.repoStr(
+                               self.repoadd = self.conf.repo_display.repoStr(
                                        pkg_info.repo_path_real)
                        else:
-                               repoadd = "%s=>%s" % (
+                               self.repoadd = "%s=>%s" % (
                                        self.conf.repo_display.repoStr(repo_path_prev),
                                        self.conf.repo_display.repoStr(pkg_info.repo_path_real))
-               if repoadd:
-                       repoadd_set.add(repoadd)
+               if self.repoadd:
+                       repoadd_set.add(self.repoadd)
 
 
        @staticmethod
@@ -785,7 +785,7 @@ class Display(object):
                                addl, pkg_info.oldbest, myinslotlist = \
                                        self._get_installed_best(pkg, pkg_info)
                                self.verboseadd = ""
-                               repoadd = None
+                               self.repoadd = None
                                self._display_use(pkg, pkg_info.oldbest, myinslotlist)
                                self.recheck_hidden(pkg)
                                if self.conf.verbosity == 3:
@@ -829,7 +829,7 @@ class Display(object):
 
                                if self.conf.columns and pkg.operation == "uninstall":
                                        continue
-                               self.print_msg.append((myprint, self.verboseadd, repoadd))
+                               self.print_msg.append((myprint, self.verboseadd, self.repoadd))
 
                                if not self.conf.tree_display \
                                        and not self.conf.no_restart \
index e5d9a2604977f2d5f61d4cc76cd71b7a65255d1b..ff6327f4a9829107485e0bb3380a6f5d9ecc31dd 100644 (file)
@@ -35,8 +35,11 @@ class _RepoDisplay(object):
                repo_paths = set()
                for root_config in roots.values():
                        portdir = root_config.settings.get("PORTDIR")
-                       if root_config.settings.repositories:
-                               repo_paths.update(root_config.settings.repositories.repoLocationList())
+                       if portdir:
+                               repo_paths.add(portdir)
+                       overlays = root_config.settings.get("PORTDIR_OVERLAY")
+                       if overlays:
+                               repo_paths.update(overlays.split())
                repo_paths = list(repo_paths)
                self._repo_paths = repo_paths
                self._repo_paths_real = [ os.path.realpath(repo_path) \
@@ -52,7 +55,6 @@ class _RepoDisplay(object):
        def repoStr(self, repo_path_real):
                real_index = -1
                if repo_path_real:
-                       repo_path_real = os.path.realpath(repo_path_real)
                        real_index = self._repo_paths_real.index(repo_path_real)
                if real_index == -1:
                        s = "?"