Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 454068 Details for
Bug 600486
app-portage/gentoolkit-9999: eshowkw incorrectly shows installed package when the same package is in several repos
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
distinguish repository of installed package
0001-eshowkw-distinguish-repository-of-installed-package-.patch (text/plain), 2.82 KB, created by
Zac Medico
on 2016-11-22 17:50:22 UTC
(
hide
)
Description:
distinguish repository of installed package
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2016-11-22 17:50:22 UTC
Size:
2.82 KB
patch
obsolete
>From 1f2607d1acbca40b5bb11a631415261f8b9f21f6 Mon Sep 17 00:00:00 2001 >From: Zac Medico <zmedico@gentoo.org> >Date: Tue, 22 Nov 2016 09:45:28 -0800 >Subject: [PATCH] eshowkw: distinguish repository of installed package (bug > 600486) > >X-Gentoo-bug: 600486 >X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=600486 >--- > pym/gentoolkit/eshowkw/keywords_content.py | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > >diff --git a/pym/gentoolkit/eshowkw/keywords_content.py b/pym/gentoolkit/eshowkw/keywords_content.py >index b6ad118..18926b4 100644 >--- a/pym/gentoolkit/eshowkw/keywords_content.py >+++ b/pym/gentoolkit/eshowkw/keywords_content.py >@@ -101,21 +101,21 @@ class keywords_content: > class VersionChecker: > def __getVersions(self, packages): > """Obtain properly aligned version strings without colors.""" >- revlength = max([len(self.__getRevision(x)) for x in packages]) >- return [self.__separateVersion(x, revlength) for x in packages] >+ revlength = max([len(self.__getRevision(x)) for x, repo in packages]) >+ return [self.__separateVersion(x, repo, revlength) for x, repo in packages] > > def __getRevision(self, cpv): > """Get revision informations for each package for nice further alignment""" > rev = port.catpkgsplit(cpv)[3] > return rev if rev != 'r0' else '' > >- def __separateVersion(self, cpv, revlength): >- return self.__modifyVersionInfo(cpv, port.versions.cpv_getversion(cpv), revlength) >+ def __separateVersion(self, cpv, repo, revlength): >+ return self.__modifyVersionInfo(cpv, repo, port.versions.cpv_getversion(cpv), revlength) > >- def __modifyVersionInfo(self, cpv, pv, revlength): >+ def __modifyVersionInfo(self, cpv, repo, pv, revlength): > """Prefix and suffix version with string based on whether version is installed or masked and its revision.""" > mask = self.__getMaskStatus(cpv) >- install = self.__getInstallStatus(cpv) >+ install = self.__getInstallStatus(cpv, repo) > > # calculate suffix length > currevlen = len(self.__getRevision(cpv)) >@@ -149,9 +149,9 @@ class keywords_content: > return False > > >- def __getInstallStatus(self, cpv): >+ def __getInstallStatus(self, cpv, repo): > """Check if package version we test is installed.""" >- return self.vartree.cpv_exists(cpv) >+ return bool(self.vartree.match("=%s::%s" % (cpv, repo))) > > def __init__(self, packages): > """Query all relevant data for version data formatting""" >@@ -344,7 +344,7 @@ class keywords_content: > self.slot_length = max([len(x) for x in self.slots]) > repositories_length = max([len(x) for x in self.repositories]) > self.keyword_length = len(keywords_list) >- vers =self.VersionChecker(packages) >+ vers =self.VersionChecker(list(zip(packages, self.repositories))) > self.versions = vers.versions > masks = vers.masks > self.version_length = max([len(x) for x in self.versions]) >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 600486
:
454050
| 454068