[Hackage] #274: Add a 'build from sdist tarball' feature

Hackage trac at galois.com
Wed May 7 18:15:32 EDT 2008


#274: Add a 'build from sdist tarball' feature
----------------------------+-----------------------------------------------
  Reporter:  guest          |        Owner:         
      Type:  enhancement    |       Status:  new    
  Priority:  low            |    Milestone:         
 Component:  Cabal library  |      Version:  1.2.3.0
  Severity:  normal         |     Keywords:         
Difficulty:  normal         |   Ghcversion:  6.8.2  
  Platform:                 |  
----------------------------+-----------------------------------------------
 I've often seen Darcs repos where the sdist tarball was incomplete, or
 where a person had a tarball which was incomplete.

 I think this is because most people just never use the tarball; if they do
 ever use it, it's because it's what was downloaded from Hackage. The
 reason is that doing so is much more complex than 'configure; build;
 install': you need to configure, create an sdist tarball, cd into dist/;
 do a tar -xvf or whatever of the correct tarball; cd into *that* - and
 then you can configure/build/install. Assuming it is a working tarball.

 Now, of course you can automate it. After the first dozen times, I wrote
 myself a shellscript to do all that for me:

 function build_sdist { clean_configure && sdist &&
     cd dist/ && untar *.tar.gz && cd `ls -t ./ | grep "/" | head -n 1` &&
     clean_configure && build && hinstall; haddock && hinstall; }

 (This is pretty long and imperfect, but it would be even longer if all the
 other aliases and function definitions were included; I think they're
 pretty straightforwardly named though, so I haven't included them.)

 It seems to me that this would be, at the very least, a useful adjunct to
 cabal check - if it makes sense to see whether various fields are filled
 out sanely, surely it makes sense to see whether needed files are
 included/listed?

 It might be even better to make the normal 'runhaskell Setup build' do it
 from sdist, but this is harder to code (besides the forgoing, you'd need
 to copy in the configuration from the top-level, from when the user ran
 'runhaskell Setup configure' and added whatever options) and possibly more
 confusing ("But Foo.hs *is* there, right there in src/! Why can't Cabal
 find it?"). So I'd be satisfied to do something like 'cabal checkdist'.

 --
 gwern

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/274>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list