Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implement new "provides" policy

  • Loading branch information...
commit d4107f03211c79e2dba4304ac9dadaa7da1b06e1 1 parent 42e8873
@donsbot donsbot authored
Showing with 56 additions and 56 deletions.
  1. +55 −55 Main.hs
  2. +1 −1  cabal2arch.cabal
View
110 Main.hs
@@ -213,80 +213,77 @@ removeCoreFrom (x@(Dependency n vr):xs) =
--
-- http://haskell.org/haskellwiki/Libraries_released_with_GHC
--
--- TODO populate this based on a dynamic check.
+-- And what Arch Linux thinks GHC provides:
--
--- Check the page too.
+-- http://repos.archlinux.org/wsvn/packages/ghc/repos/extra-x86_64/PKGBUILD
+--
+-- Note: we could just list these directly, and have yaourt solve them.
+--
+-- NEW POLICY:
+-- We rely on all "provides" from the GHC library to be listed explicitly.
--
corePackages :: [Dependency]
corePackages =
[
- Dependency (PackageName "Cabal") (ThisVersion (Version [1,6,0,1] []))
- ,Dependency (PackageName "HUnit") (ThisVersion (Version [1,2,0,3] []))
- ,Dependency (PackageName "QuickCheck") (ThisVersion (Version [1,2,0,0] []))
- ,Dependency (PackageName "array") (ThisVersion (Version [0,2,0,0] []))
- ,Dependency (PackageName "base") (ThisVersion (Version [4,1,0,0] []))
- ,Dependency (PackageName "bytestring") (ThisVersion (Version [0,9,1,4] []))
- ,Dependency (PackageName "containers") (ThisVersion (Version [0,2,0,0] []))
- ,Dependency (PackageName "directory") (ThisVersion (Version [1,0,0,2] []))
+-- Magic packages we have to remove
+ Dependency (PackageName "base") (ThisVersion (Version [4,1,0,0] []))
,Dependency (PackageName "dph-base") (ThisVersion (Version [ 0,3 ] [] ))
,Dependency (PackageName "dph-par" ) (ThisVersion (Version [ 0,3 ] [] ))
,Dependency (PackageName "dph-prim-interface") (ThisVersion (Version [ 0,3 ] [] ))
,Dependency (PackageName "dph-prim-par" ) (ThisVersion (Version [ 0,3 ] [] ))
,Dependency (PackageName "dph-prim-seq" ) (ThisVersion (Version [ 0,3 ] [] ))
,Dependency (PackageName "dph-seq" ) (ThisVersion (Version [ 0,3 ] [] ))
-
--- removed:
--- ,Dependency (PackageName "editline") (AnyVersion)
- ,Dependency (PackageName "filepath") (ThisVersion (Version [1,1,0,1] []))
,Dependency (PackageName "ghc") (AnyVersion)
,Dependency (PackageName "ghc-prim") (AnyVersion)
- ,Dependency (PackageName "haskell-src") (ThisVersion (Version [1,0,1,3] []))
- ,Dependency (PackageName "haskell98") (ThisVersion (Version [1,0,1,0] []))
- ,Dependency (PackageName "hpc") (ThisVersion (Version [0,5,0,2] []))
- ,Dependency (PackageName "html") (ThisVersion (Version [1,0,1,2] []))
- ,Dependency (PackageName "integer") (ThisVersion (Version [0,1,0,0] []))
- ,Dependency (PackageName "mtl") (ThisVersion (Version [1,1,0,2] []))
- ,Dependency (PackageName "network") (ThisVersion (Version [2,2,0,1] []))
- ,Dependency (PackageName "old-locale") (ThisVersion (Version [1,0,0,1] []))
- ,Dependency (PackageName "old-time") (ThisVersion (Version [1,0,0,1] []))
- ,Dependency (PackageName "packedstring") (ThisVersion (Version [0,1,0,1] []))
- ,Dependency (PackageName "parallel") (ThisVersion (Version [1,1,0,0] []))
- ,Dependency (PackageName "parsec") (ThisVersion (Version [2,1,0,0] []))
- ,Dependency (PackageName "pretty") (ThisVersion (Version [1,0,1,0] []))
- ,Dependency (PackageName "process") (ThisVersion (Version [1,0,1,0] []))
- ,Dependency (PackageName "random") (ThisVersion (Version [1,0,0,1] []))
- ,Dependency (PackageName "regex-base") (ThisVersion (Version [0,72,0,2] []))
- ,Dependency (PackageName "regex-compat") (ThisVersion (Version [0,71,0,1] []))
- ,Dependency (PackageName "regex-posix") (ThisVersion (Version [0,72,0,2] []))
- ,Dependency (PackageName "stm") (ThisVersion (Version [2,1,1,2] []))
- ,Dependency (PackageName "syb") (ThisVersion (Version [0,1,0,0] []))
- ,Dependency (PackageName "template-haskell") (ThisVersion (Version [2,3,0,0] []))
--- ,Dependency (PackageName "time") (ThisVersion (Version [1,1,2,2] []))
- ,Dependency (PackageName "unix") (ThisVersion (Version [2,3,1,0] []))
- ,Dependency (PackageName "xhtml") (ThisVersion (Version [3000,2,0,1] []))
-
+-- Official Provides: http://repos.archlinux.org/wsvn/packages/ghc/repos/extra-x86_64/PKGBUILD
+-- ,Dependency (PackageName "array") (ThisVersion (Version [0,3,0,0] []))
+-- ,Dependency (PackageName "bytestring") (ThisVersion (Version [0,9,1,5] []))
+-- ,Dependency (PackageName "Cabal") (ThisVersion (Version [1,8,0,2] []))
+-- ,Dependency (PackageName "containers") (ThisVersion (Version [0,3,0,0] []))
+-- ,Dependency (PackageName "directory") (ThisVersion (Version [1,0,1,0] []))
+-- ,Dependency (PackageName "extensible-exceptions") (AnyVersion)
+-- ,Dependency (PackageName "filepath") (ThisVersion (Version [1,1,0,3] []))
+-- ,Dependency (PackageName "haskell98") (ThisVersion (Version [1,0,1,1] []))
+-- ,Dependency (PackageName "hpc") (ThisVersion (Version [0,5,0,4] []))
+-- ,Dependency (PackageName "old-locale") (ThisVersion (Version [1,0,0,2] []))
+-- ,Dependency (PackageName "old-time") (ThisVersion (Version [1,0,0,1] []))
+-- ,Dependency (PackageName "pretty") (ThisVersion (Version [1,0,1,1] []))
+-- ,Dependency (PackageName "process") (ThisVersion (Version [1,0,1,2] []))
+-- ,Dependency (PackageName "random") (ThisVersion (Version [1,0,0,2] []))
+-- ,Dependency (PackageName "syb") (ThisVersion (Version [0,1,0,2] []))
+-- ,Dependency (PackageName "template-haskell") (ThisVersion (Version [2,4,0,0] []))
+-- ,Dependency (PackageName "time") (ThisVersion (Version [1,1,4] []))
+-- ,Dependency (PackageName "unix") (ThisVersion (Version [2,4,0,0] []))
+-- utf8-string
+
+
+-- Removed in 6.12.x
+-- ,Dependency (PackageName "html") (ThisVersion (Version [1,0,1,2] []))
+-- ,Dependency (PackageName "integer") (ThisVersion (Version [0,1,0,0] []))
+-- ,Dependency (PackageName "QuickCheck") (ThisVersion (Version [1,2,0,0] []))
+-- ,Dependency (PackageName "haskell-src") (ThisVersion (Version [1,0,1,3] []))
+-- ,Dependency (PackageName "parsec") (ThisVersion (Version [2,1,0,0] []))
+-- ,Dependency (PackageName "packedstring") (ThisVersion (Version [0,1,0,1] []))
+-- ,Dependency (PackageName "parallel") (ThisVersion (Version [1,1,0,0] []))
+-- ,Dependency (PackageName "network") (ThisVersion (Version [2,2,0,1] []))
+-- ,Dependency (PackageName "mtl") (ThisVersion (Version [1,1,0,2] []))
+-- ,Dependency (PackageName "stm") (ThisVersion (Version [2,1,1,2] []))
+-- ,Dependency (PackageName "HUnit") (ThisVersion (Version [1,2,0,3] []))
+-- ,Dependency (PackageName "xhtml") (ThisVersion (Version [3000,2,0,1] []))
+-- ,Dependency (PackageName "regex-base") (ThisVersion (Version [0,72,0,2] []))
+-- ,Dependency (PackageName "regex-compat") (ThisVersion (Version [0,71,0,1] []))
+-- ,Dependency (PackageName "regex-posix") (ThisVersion (Version [0,72,0,2] []))
+
+-- Removed in 6.10.x
+-- ,Dependency (PackageName "editline") (AnyVersion)
-- Dependency (PackageName "ALUT") (ThisVersion (Version [2,1,0,0] []))
-- ,Dependency (PackageName "cgi") (ThisVersion (Version [3001,1,5,1] []))
--- ,Dependency (PackageName "extensible-exceptions") (AnyVersion)
-- ,Dependency (PackageName "fgl") (ThisVersion (Version [5,4,1,1] [])) -- gone
-- ,Dependency (PackageName "GLUT") (ThisVersion (Version [2,1,1,1] []))
--- ,Dependency (PackageName "OpenAL") (ThisVersion (Version [1,3,1,1] [])) -- gone
--- ,Dependency (PackageName "readline") (ThisVersion (Version [1,0,1,0] []))
-
-{-
-ALUT-2.1.0.0 cgi-3001.1.5.1 network-2.1.0.0 regex-base-0.72.0.1
-Cabal-1.2.3.0 containers-0.1.0.1 old-locale-1.0.0.0 regex-compat-0.71.0.1
-GLUT-2.1.1.1 directory-1.0.0.0 old-time-1.0.0.0 regex-posix-0.72.0.2
-HUnit-1.2.0.0 fgl-5.4.1.1 packedstring-0.1.0.0 stm-2.1.1.0
-OpenAL-1.3.1.1 filepath-1.1.0.0 parallel-1.0.0.0 template-haskell-2.2.0.0
-OpenGL-2.2.1.1 haskell-src-1.0.1.1 parsec-2.1.0.0 time-1.1.2.0
-QuickCheck-1.1.0.0 haskell98-1.0.1.0 pretty-1.0.0.0 unix-2.3.0.0
-array-0.1.0.0 hpc-0.5.0.0 process-1.0.0.0 xhtml-3000.0.2.1
-base-3.0.1.0 html-1.0.1.1 random-1.0.0.0
-bytestring-0.9.0.1 mtl-1.1.0.0 readline-1.0.1.0
--}
+-- ,Dependency (PackageName "OpenAL") (ThisVersion (Version [1,3,1,1] [])) -- gone
+-- ,Dependency (PackageName "readline") (ThisVersion (Version [1,0,1,0] []))
]
@@ -483,6 +480,9 @@ pkg2doc email pkg = vcat
[ text "# Contributor:"
<+> text email
, text "# Package generated by cabal2arch" <+> disp version
+ , text "# Note: we list all package dependencies."
+ , text "# Your package tool should understand 'provides' syntax"
+ , text "#"
, text "pkgname"
<=> text (arch_pkgname pkg)
, text "pkgrel"
View
2  cabal2arch.cabal
@@ -1,5 +1,5 @@
name: cabal2arch
-version: 0.6.1
+version: 0.7
homepage: http://code.haskell.org/~dons/code/cabal2arch
synopsis: Create Arch Linux packages from Cabal packages
description: Create Arch Linux packages from Cabal packages
Please sign in to comment.
Something went wrong with that request. Please try again.