[arch-haskell] Checksum failures when building all packages

Magnus Therning magnus at therning.org
Sun Apr 27 21:08:15 UTC 2014


On Sun, Apr 27, 2014 at 01:23:18PM -0700, Richard Wallace wrote:
> Right, sorry for not including more details.  So what I'm trying to do is
> get all the needed packages for adding taffybar built.  The first I tried
> with was HStringTemplate.  My last attempt at doing this looking a bit like
> 
> # just getting started, making sure I can build from a clean repo
> $ git clone git://github.com/archhaskell/habs.git
> $ cd habs
> $ cblrepo sync
> $ cblrepo pkgbuild --ghc-version 7.8.2-1 $(cblrepo build base|tail -n +2)
> $ ./makeahpkg -c -- $(cblrepo build base | tail -n +2)
> 
> # that worked, no problem, so now I try adding HStringTemplate
> $ cblrepo add HStringTemplate,0.7.3
> $ cblrepo pkgbuild --ghc-version 7.8.2-1 HStringTemplate
> $ ./makeahpkg -c -- HStringTemplate
> 
> This ended up giving me a checksum error on the haskell-mtl package.
> 
> If I instead do the last step with the `./makeahpkg -c -- $(cblrepo build
> base | tail -n +2)` everything builds without a hitch.  At first I thought
> I had to clean out all the previously built packages using `git clean -fd`,
> but that turns out to not be the case.  Do I just need to include all the
> HStringTemplate dependencies when trying to build it?

Now things are a bit clearer to me :)

A few things that might clear things up a bit:

1. The packages in HABS are available pre-built in the [haskell-core]
   repo[^1].
2. The chroot that `makeahpkg` creates is already pointing to
   [haskell-core] and thus will download any missing Haskell packages
   from there.
3. `makeahpkg` keeps two chroots, one 'root' and one 'build'.  All
   packages are built in 'build'.
4. The argument '-c' will sync 'root' and 'build', i.e. any packages
   that have been built and installed in 'build' will effectively be
   removed by using `makeahpkg -c`.
5. If `makeahpkg` finds that a package has already been built, it will
   skip building and installing it again.

This means that you never really *need* to build all of HABS.  It also
means that if you are adding several packages but building them one at
a time you really shouldn't use the '-c' argument, since you then will
have to first remove any already built packages in the habs/ area, and
then rebuild all dependencies for the package you really wanted.

I believe, but please correct me if I'm wrong, that the installing of
the package at the end means the package ends up in the local pacman
cache.  If that's the case then what you see is explained by:

 1. You build all of HABS locally, which means it's all in your local
    pacman cache.
 2. You clean out the build chroot.
 3. The package you want to build (HStringTemplate) now depends on
    uninstalled packages.
 4. Pacman tries the locally cached packages, but finds they don't
    match what comes from [haskell-core] -- checksum error!

The reson that it works the second time is that the cache is cleansed
of non-matching packages as they are found.

/M

[^1]: http://is.gd/DDV64T

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: magnus at therning.org   jabber: magnus at therning.org
twitter: magthe               http://therning.org/magnus

Most software today is very much like an Egyptian pyramid with
millions of bricks piled on top of each other, with no structural
integrity, but just done by brute force and thousands of slaves.
     -- Alan Kay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/arch-haskell/attachments/20140427/b632242b/attachment.sig>


More information about the arch-haskell mailing list