Ticket #153 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Cabal makes empty data directories

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Cabal library Version: 1.2.0
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.4.2 Platform: Linux

Description

In  http://www.haskell.org/pipermail/cvs-ghc/2007-September/038121.html Sven writes:

The current Cabal used for building GHC has a small bug, it *always* creates 
the data directory, even if there are no data files in the package. Simple 
fix:

*** /tmp/Install.hs     2007-09-09 14:56:50.000000000 +0200
--- Distribution/Simple/Install.hs      2007-09-09 12:57:21.000000000 +0200
***************
*** 115,121 ****
         (putStrLn ("directory " ++ haddockPref pkg_descr ++
                    " does exist: " ++ show docExists))
    when (dataFilesExist || docExists) $ do
-     createDirectoryIfMissingVerbose verbosity True dataPref
      flip mapM_ (dataFiles pkg_descr) $ \ file -> do
        let dir = takeDirectory file
        createDirectoryIfMissingVerbose verbosity True (dataPref </> dir)
--- 115,120 ----



Nothing substantial, but this leads to lots of useless empty directories when 
GHC is installed. Feel free to apply this fix in the right repository... (No 
idea which)

Change History

Changed 6 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

Applied, thanks.

Note: See TracTickets for help on using tickets.