On Mon, 2012-06-25 at 16:26 +0300, Slava Bacherikov wrote: > Hello all. > > My project task is creating new version of packages.gentoo.org site. > You could find it on > http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-packages.git;a=summary > 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. > > 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. > 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 544 def update_news(self, repos=None): [snip] 553 # get the actual repo_name from portage 554 # because it may be different than layman's name for it 555 repo_names = [] 556 for repo in repos: 557 ovl = self._get_installed_db().select(repo) 558 ovl_path = os.path.join(ovl.config['storage'], repo) 559 repo_names.append(portdb.getRepositoryName(ovl_path)) 560 self.output.debug("LaymanAPI: update_news(); repo_names = " 561 + str(repo_names), 4) 562 news_counts = count_unread_news(portdb, vardb, repo_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 = " + ovl) 542 for repo in self.settings.tree: 543 try: 544 if repo.location == 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=porthole/porthole;a=tree;f=pmbackends;hb=refs/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. > I also developed a backends mechanism for scan - now it can collect > 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 :-) > > I also worked on the designs and the general improvement of the code. > > Plans for the this week: > I'm gonna document my classes > I also plan work on views, layout and scanning tool. > -- Brian Dolbec