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 1SjJKt-0001Gt-J9 for garchives@archives.gentoo.org; Tue, 26 Jun 2012 00:08:51 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 351CFE0E85 for ; Tue, 26 Jun 2012 00:08:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BBAD9E0CC1 for ; Mon, 25 Jun 2012 23:34:08 +0000 (UTC) Received: from [192.168.1.210] (unknown [24.86.176.233]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 1633E1B402D; Mon, 25 Jun 2012 23:34:08 +0000 (UTC) Message-ID: <1340667238.11992.39.camel@big_daddy.dol-sen.ca> Subject: Re: [gentoo-soc] New gentoo packages -- report #5 From: Brian Dolbec To: gentoo-soc@lists.gentoo.org Cc: quantumsummers@gentoo.org Date: Mon, 25 Jun 2012 16:33:58 -0700 In-Reply-To: <4FE86719.1070701@bacherikov.org.ua> References: <4FE86719.1070701@bacherikov.org.ua> Organization: Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-OQzPkKPEOUDC0Q+Ma5TZ" X-Mailer: Evolution 3.2.3 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-soc@lists.gentoo.org Reply-to: gentoo-soc@lists.gentoo.org Mime-Version: 1.0 X-Archives-Salt: 1d0fc861-c952-4050-bfb0-4fb40ce811bf X-Archives-Hash: 9a249c4c68124747d051a56545065080 --=-OQzPkKPEOUDC0Q+Ma5TZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2012-06-25 at 16:26 +0300, Slava Bacherikov wrote: > Hello all. >=20 > My project task is creating new version of packages.gentoo.org site. > You could find it on > http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoo-packages.git;a=3Ds= ummary > or on https://github.com/bacher09/gentoo-packages > If you want to submit feature request you may do this by assign issue on > github to me. >=20 > Last week I worked on improving collection information and view. I've > added ability to get and store additional information about the overlay, > but came up against a small problem. Name of overlay could be not equal > to name in repo_name. For example haskell overlay in the repo_name file > has name gentoo-haskell. > I partially solved this problem, now if it > could not find equal overlay name it tries add or delete 'gentoo-' prefix= . >=20 Sorry, I didn't get the irc channel your using added into my irc client's autojoin. But I have been in #-soc... I ran into this same problem with layman. It was adding the news reporting to layman where I had the problem. Since, layman does not do the news reporting directly. I ran some code to get the correct repo_name from portage. There are some nice convienience functions which I had implemented in portage a few years back (saved doing it in porthole). Then have portage report any new news items in the overlay(s). Pkgcore does not yet have the news reporting feature. Check layman/api.py =20 544 def update_news(self, repos=3DNone): [snip] 553 # get the actual repo_name from portage 554 # because it may be different than layman's name f= or it 555 repo_names =3D [] 556 for repo in repos: 557 ovl =3D self._get_installed_db().select(repo) 558 ovl_path =3D os.path.join(ovl.config['storage'= ], repo) 559 repo_names.append(portdb.getRepositoryName(ovl= _path)) 560 self.output.debug("LaymanAPI: update_news(); repo_= names =3D " 561 + str(repo_names), 4) 562 news_counts =3D count_unread_news(portdb, vardb, r= epo_names) 563 display_news_notifications(news_counts) ... Also note that pkgcore has both the repo_name and path info available, although it does not have convienience funtions to get the other, given one. Here is how we are doing it in porthole's pkgcore backend. def get_overlay_name(self, ovl): 541 #debug.dprint("PKGCORE.lib: get_overlay_name(); ovl =3D " + ovl) 542 for repo in self.settings.tree: 543 try: 544 if repo.location =3D=3D ovl: 545 return repo.repo_id 546 except AttributeError: 547 continue 548 return "" Also if your looking for more pkgcore api's here's the link to the dev_api branch where the backend porting work has been going on. http://porthole.git.sourceforge.net/git/gitweb.cgi?p=3Dporthole/porthole;a= =3Dtree;f=3Dpmbackends;hb=3Drefs/heads/dev_api you can look thru the pkgcore and portage sub-pkgs. Bare in mind that some things are in flux, more in the portage backend in order to keep things in line with the pkgcore backend. I just ask that if you find out how to do something in pkgcore that you see has not yet been ported in porthole's pkgcore backend. To please tell me :-) so I can implement it.=20 > I also developed a backends mechanism for scan - now it can collect=20 > information through portage or pkgcore, backend could be select the > settings file. Also implement another scaning backend is very easy, just > need implement special interface. good :-) >=20 > I also worked on the designs and the general improvement of the code. >=20 > Plans for the this week: > I'm gonna document my classes > I also plan work on views, layout and scanning tool. >=20 --=20 Brian Dolbec --=-OQzPkKPEOUDC0Q+Ma5TZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAABAgAGBQJP6PVnAAoJECIU2QoBTxfLtMwIANUE9q8/5JbAsIyJmRRaj02/ 6wNokmAT0Rl0I3FCvSGw/BnuqlvTsMPMCLo4YxX/FeTdkejAUtnn2E9NZHLl4JJl EXmNVeSR8R3hsTMNAMXcg5uzPHPV12FWVAYeG8UBSEDfzLYhkV2ekif9R26Sl5Rj fiN5Ip5XRSaL1yw5elb4EeOL9VRMMYSHa6fgxypJAYlM2U5M95oxGIIX+HetXN3A S4qvEjyAY0iQRCAMCrpKmibhcO7F7l6bAvTwNwkPYtJW/D/sObsoX2j0CRRUP06+ waAMEMwdmC3oZpRAi2v/rXbkfTorqd6xCifzilTG4c54VWCwaViejERkW2f2wTc= =7Tqz -----END PGP SIGNATURE----- --=-OQzPkKPEOUDC0Q+Ma5TZ--