Hi, Please find attached an ebuild for adelie-20060430. Adelie is a fast replacement for the equery tool, written in Haskell. It should be placed in app-portage/adelie.
Created attachment 85805 [details] mentioned ebuild
bug-wranglers@gentoo.org
Looks ok. We'd prefer if it used Cabal to build. It should be pretty easy to convert to using cabal and the haskell-cabal.eclass.
Created attachment 85818 [details] cabalised version of ebuild If the package were to use Cabal then we'd use this ebuild.
Created attachment 85821 [details] possible adelie.cabal file Here's a .cabal file to build adeline ok. To use it, drop it into the build directory along with a minimal Setup.hs: import Distribution.Simple main = defaultMain To build: runghc Setup.hs configure runghc Setup.hs build To roll a new tarball: runghc Setup.hs sdist A couple other recomendations if you decide to do another release using Cabal: * add a one line copyright notice to at least Main.hs (or better to each source file) * use a release version number rather than just a date.
Comment on attachment 85821 [details] possible adelie.cabal file >Name: adelie >Version: 0.0.2006.04.30 >Maintainer: David Wang <millimillenary@gmail.com> >Author: David Wang <millimillenary@gmail.com> >Copyright: 2006 David Wang >License-File: LICENCE.txt >License: OtherLicense >Build-depends: base, haskell98, parsec, unix > >Executable: adelie >Main-is: Main.hs >GHC-Options: -O
That is I got the license wrong in the .cabal file, it should be: License: OtherLicense
Thanks for the cabal file. I'll use it in the next release. Also, should the ebuild have 'as-is' or 'zlib' as the licence?
(In reply to comment #8) > Thanks for the cabal file. I'll use it in the next release. Great. I hope we'll be able to get that release into portage. > Also, should the ebuild have 'as-is' or 'zlib' as the licence? I think 'as-is' is right. The zlib licence is rather specific to zlib itself.
David, another thing to include in the next release might be to extend the command line syntax so that it accepts the existing equery syntax. For example: equery belongs /usr/bin/foo but: adelie b /usr/bin/foo If people can use it as a drop-in replacement that might be better. If this is going to go into portage, could you give us some idea of how much of portage internals it relies on? Is it going to break when portage internals change? How will we know when it breaks? I wonder if it'd be more acceptable to people if we built it with hugs (or yhc) rather than ghc. Would we still get the performance advantages if we used hugs?
(In reply to comment #10) > If people can use it as a drop-in replacement that might be better. > > If this is going to go into portage, could you give us some idea of how much of > portage internals it relies on? Is it going to break when portage internals > change? How will we know when it breaks? From a short look at the code I notice that it uses /var/db/pkg directly. So as soon as portage changes the on-disk format Adelie will blow up. Any big upgrade (2.1 --> 3.0 ;-) ) of portage might do this without warning. Also I don't see any additional benefits compared to portage-utils, so while I have no personal objection to adding this ebuild I don't see any advantages it has (apart from showing once again that Haskell is a really cool language).
Has adelie been tested with the current portage 2.1 ?
adelie seems to break on "provided" packages. Packages entered in /etc/portage/package.provided occur in the portage db, but have no CONTENTS or USE files which adelie expects to exist. Wrt the discussion about whether to include it or not: I don't see huge problems that it's using /var/db/pkg directly as long as it is actively supported and will be adapted when portage changes the format (eix works the same way, doesn't it?) The question is really whether it is going to stay, and will be actively developed and supported for a while, or if it is mainly a proof of concept that is considered to be finished now that it works ... I don't see any problem at all to include it in the Haskell overlay right now ... ks
I'm using portage 2.1_pre6-r3, which somehow I've forgotten to mention. (I realise this is not the latest) I emerged portage-utils a while ago (after starting Adelie), saw 'cache' and promptly unmerged it. I tried it again today. The use flag related options seem to be different, but other than that, adelie's just slower. Oh, well. As long as I'm using gentoo, I'll try to keep it working.
The ebuild is in the haskell overlay now. We'll try and decide if it should go into portage.
Note the name change (fquery). http://home.exetel.com.au/tjaden/fquery/ The ebuild we're using in the haskell overlay is now identical to the one contributed by the upstream author: http://home.exetel.com.au/tjaden/fquery/fquery-0.2.ebuild
Added as: >*fquery-0.2.1.4 (13 Jan 2013) > > 13 Jan 2013; Sergei Trofimovich <slyfox@gentoo.org> +fquery-0.2.1.4.ebuild, > +metadata.xml: > Initial import (bug #131745 by David Wang). Thanks!