<div dir="ltr">Aha! I understand now. I was overusing the -c option.  Things are going much more smoothly now.  Thanks!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 27, 2014 at 2:08 PM, Magnus Therning <span dir="ltr"><<a href="mailto:magnus@therning.org" target="_blank">magnus@therning.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Sun, Apr 27, 2014 at 01:23:18PM -0700, Richard Wallace wrote:<br>
> Right, sorry for not including more details.  So what I'm trying to do is<br>
> get all the needed packages for adding taffybar built.  The first I tried<br>
> with was HStringTemplate.  My last attempt at doing this looking a bit like<br>
><br>
> # just getting started, making sure I can build from a clean repo<br>
> $ git clone git://<a href="http://github.com/archhaskell/habs.git" target="_blank">github.com/archhaskell/habs.git</a><br>
> $ cd habs<br>
> $ cblrepo sync<br>
> $ cblrepo pkgbuild --ghc-version 7.8.2-1 $(cblrepo build base|tail -n +2)<br>
> $ ./makeahpkg -c -- $(cblrepo build base | tail -n +2)<br>
><br>
> # that worked, no problem, so now I try adding HStringTemplate<br>
> $ cblrepo add HStringTemplate,0.7.3<br>
> $ cblrepo pkgbuild --ghc-version 7.8.2-1 HStringTemplate<br>
> $ ./makeahpkg -c -- HStringTemplate<br>
><br>
> This ended up giving me a checksum error on the haskell-mtl package.<br>
><br>
> If I instead do the last step with the `./makeahpkg -c -- $(cblrepo build<br>
> base | tail -n +2)` everything builds without a hitch.  At first I thought<br>
> I had to clean out all the previously built packages using `git clean -fd`,<br>
> but that turns out to not be the case.  Do I just need to include all the<br>
> HStringTemplate dependencies when trying to build it?<br>
<br>
</div>Now things are a bit clearer to me :)<br>
<br>
A few things that might clear things up a bit:<br>
<br>
1. The packages in HABS are available pre-built in the [haskell-core]<br>
   repo[^1].<br>
2. The chroot that `makeahpkg` creates is already pointing to<br>
   [haskell-core] and thus will download any missing Haskell packages<br>
   from there.<br>
3. `makeahpkg` keeps two chroots, one 'root' and one 'build'.  All<br>
   packages are built in 'build'.<br>
4. The argument '-c' will sync 'root' and 'build', i.e. any packages<br>
   that have been built and installed in 'build' will effectively be<br>
   removed by using `makeahpkg -c`.<br>
5. If `makeahpkg` finds that a package has already been built, it will<br>
   skip building and installing it again.<br>
<br>
This means that you never really *need* to build all of HABS.  It also<br>
means that if you are adding several packages but building them one at<br>
a time you really shouldn't use the '-c' argument, since you then will<br>
have to first remove any already built packages in the habs/ area, and<br>
then rebuild all dependencies for the package you really wanted.<br>
<br>
I believe, but please correct me if I'm wrong, that the installing of<br>
the package at the end means the package ends up in the local pacman<br>
cache.  If that's the case then what you see is explained by:<br>
<br>
 1. You build all of HABS locally, which means it's all in your local<br>
    pacman cache.<br>
 2. You clean out the build chroot.<br>
 3. The package you want to build (HStringTemplate) now depends on<br>
    uninstalled packages.<br>
 4. Pacman tries the locally cached packages, but finds they don't<br>
    match what comes from [haskell-core] -- checksum error!<br>
<br>
The reson that it works the second time is that the cache is cleansed<br>
of non-matching packages as they are found.<br>
<br>
/M<br>
<br>
[^1]: <a href="http://is.gd/DDV64T" target="_blank">http://is.gd/DDV64T</a><br>
<div class=""><br>
--<br>
Magnus Therning                      OpenPGP: 0xAB4DFBA4<br>
email: <a href="mailto:magnus@therning.org">magnus@therning.org</a>   jabber: <a href="mailto:magnus@therning.org">magnus@therning.org</a><br>
twitter: magthe               <a href="http://therning.org/magnus" target="_blank">http://therning.org/magnus</a><br>
<br>
</div>Most software today is very much like an Egyptian pyramid with<br>
millions of bricks piled on top of each other, with no structural<br>
integrity, but just done by brute force and thousands of slaves.<br>
     -- Alan Kay<br>
</blockquote></div><br></div>