From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SC0pq-0005G7-5k for garchives@archives.gentoo.org; Mon, 26 Mar 2012 03:43:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF224E0281; Mon, 26 Mar 2012 03:43:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 87D71E02C4 for ; Mon, 26 Mar 2012 03:43:02 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D13691B405B for ; Mon, 26 Mar 2012 03:43:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 95A1CE542C for ; Mon, 26 Mar 2012 03:43:00 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1332733211.7a74871ab63f3b36d7d2377a5af5b0cfc1a2ee29.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/api.py X-VCS-Directories: layman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 7a74871ab63f3b36d7d2377a5af5b0cfc1a2ee29 X-VCS-Branch: master Date: Mon, 26 Mar 2012 03:43:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: bde94dcf-94b9-44ca-85c8-a19730d01afd X-Archives-Hash: 761df2e21ab7097f98ea37b7d6be52a4 commit: 7a74871ab63f3b36d7d2377a5af5b0cfc1a2ee29 Author: Brian Dolbec gentoo org> AuthorDate: Mon Mar 26 03:40:11 2012 +0000 Commit: Brian Dolbec gmail com> CommitDate: Mon Mar 26 03:40:11 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/layman.git;a=3D= commit;h=3D7a74871a fix bug 408897 for when profiles/repo_name is not the same as the layman = overlay name. --- layman/api.py | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/layman/api.py b/layman/api.py index 3f33a42..2f6c183 100755 --- a/layman/api.py +++ b/layman/api.py @@ -550,7 +550,15 @@ class LaymanAPI(object): display_news_notifications portdb =3D db[root]["porttree"].dbapi vardb =3D db[root]["vartree"].dbapi - news_counts =3D count_unread_news(portdb, vardb, rep= os) + # get the actual repo_name from portage + # because it may be different than layman's name for= it + repo_names =3D [] + for repo in repos: + ovl =3D self._get_installed_db().select(repo) + ovl_path =3D os.path.join(ovl.config['storage'],= repo) + repo_names.append(portdb.getRepositoryName(ovl_p= ath)) + self.output.debug("LaymanAPI: update_news(); repo_na= mes =3D", repo_names, 4) + news_counts =3D count_unread_news(portdb, vardb, rep= o_names) display_news_notifications(news_counts) except ImportError: # deprecated funtionality, remove when the above met= hod