[arch-haskell] Thoughts on Procedure

Don Stewart dons at galois.com
Sat Oct 12 07:36:59 UTC 2013


simons:
> Hi guys,
> 
> in my understanding, our current update procedure works like this:
> 
>  1) We notice that a package was updated (or added) on Hackage by means
>     of RSS.
> 
>  2) A maintainer runs cabal2arch to generate an updated PKGBUILD.
> 
>  3) If the generated PKGBUILD looks good, the file is committed to the
>     Git repository and uploaded to AUR.
> 
> There are a few things worth noting about that procedure:
> 
>  - A maintainer must perform 1 manual step per updated package: that is
>    linear complexity O(n).
> 
>  - There is no mechanism to guarantee that the updated set of PKGBUILD
>    files actually works.

Under my old system, each package was 

    * converted via cabal2arch

type check and compile the result:

    *  makepkg -f

So anything into AUR has to at least have type checked at one point
(even though each upload could have broken downstream packages). 

It will be a stronger position if you aim for always having a
"consistent" package set -- i.e. all packages are guaranteed to be
consistent with respect to their version needs. A binary approach will
demand this.
  
> 
> Naturally, one wonders how to improve the update process. There are a
> few possible optimizations:
> 
>  - The simplest way to verify whether all PKGBUILDs compile is to, well,
>    compile them. Given a set of updated packages, all packages that
>    directly or indirectly depend on any of the updated packages need
>    re-compilation, and the current set of PKGBUILDs is to be considered
>    valid only if all those builds succeed.
> 
>  3) Run "make all" to re-build all PKGBUILD files that need updating.
> 
>  4) Run "make check" to perform all necessary re-builds of binary
>     packages. If all builds succeed, proceed with (5). Otherwise, figure
>     out which package broke the build and revert the changes in the
>     corresponding Cabal file. Go back to (3).
> 
>  5) Run "make upload" and "git commit" the changes.

So we'll always have a consistent set? This would be a valuable list --
no other distro aims for this, other than Debian, which aims only to
support a few hundred packages.

I think a full rebuild of the dependency tree each time is the only way
to be sure -- to force typechecking of the affected parts of the tree.
Additionally, once 'cabal check' is more widespread, you may also do
functional testing of the tree.

-- Don



More information about the arch-haskell mailing list