Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131745 - app-portage/fquery (new ebuild)
Summary: app-portage/fquery (new ebuild)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Haskell Language team
URL: http://home.exetel.com.au/tjaden/fquery/
Whiteboard: [haskell-overlay]
Keywords: EBUILD, InOverlay
Depends on:
Blocks:
 
Reported: 2006-04-29 19:19 UTC by David Wang
Modified: 2013-01-13 20:11 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mentioned ebuild (adelie-20060430.ebuild,436 bytes, text/plain)
2006-04-29 19:20 UTC, David Wang
Details
cabalised version of ebuild (adelie-20060430.ebuild,429 bytes, text/plain)
2006-04-30 03:16 UTC, Duncan Coutts (RETIRED)
Details
possible adelie.cabal file (adelie.cabal,299 bytes, text/plain)
2006-04-30 03:55 UTC, Duncan Coutts (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Wang 2006-04-29 19:19:30 UTC
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.
Comment 1 David Wang 2006-04-29 19:20:25 UTC
Created attachment 85805 [details]
mentioned ebuild
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-04-30 00:14:56 UTC
bug-wranglers@gentoo.org
Comment 3 Duncan Coutts (RETIRED) gentoo-dev 2006-04-30 03:14:37 UTC
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.
Comment 4 Duncan Coutts (RETIRED) gentoo-dev 2006-04-30 03:16:13 UTC
Created attachment 85818 [details]
cabalised version of ebuild

If the package were to use Cabal then we'd use this ebuild.
Comment 5 Duncan Coutts (RETIRED) gentoo-dev 2006-04-30 03:55:51 UTC
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 6 Duncan Coutts (RETIRED) gentoo-dev 2006-04-30 05:19:52 UTC
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
Comment 7 Duncan Coutts (RETIRED) gentoo-dev 2006-04-30 05:20:55 UTC
That is I got the license wrong in the .cabal file, it should be:
License: OtherLicense
Comment 8 David Wang 2006-04-30 05:26:45 UTC
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?
Comment 9 Duncan Coutts (RETIRED) gentoo-dev 2006-04-30 05:43:30 UTC
(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.
Comment 10 Duncan Coutts (RETIRED) gentoo-dev 2006-04-30 05:58:34 UTC
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?
Comment 11 Patrick Lauer gentoo-dev 2006-04-30 06:08:27 UTC
(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).
Comment 12 Duncan Coutts (RETIRED) gentoo-dev 2006-04-30 06:13:17 UTC
Has adelie been tested with the current portage 2.1 ?
Comment 13 Andres Loeh (RETIRED) gentoo-dev 2006-04-30 09:29:06 UTC
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
Comment 14 David Wang 2006-04-30 15:29:24 UTC
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.
Comment 15 Duncan Coutts (RETIRED) gentoo-dev 2006-06-18 15:00:19 UTC
The ebuild is in the haskell overlay now.

We'll try and decide if it should go into portage.
Comment 16 Duncan Coutts (RETIRED) gentoo-dev 2006-06-18 15:16:34 UTC
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
Comment 17 Sergei Trofimovich (RETIRED) gentoo-dev 2013-01-13 20:11:41 UTC
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!