Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: haskell/cabal
...
head fork: haskell/cabal
This comparison is big! We're only showing the most recent 250 commits
Commits on Feb 21, 2008
Lennart Kolmodin kolmodin Fix typo 5e64fb2
Lennart Kolmodin kolmodin When a package seems ok, say so 45ff5ee
Lennart Kolmodin kolmodin Make the qa check return an exit code reporting the status b1b7830
Commits on Feb 22, 2008
Duncan Coutts dcoutts Use exitFailure rather than exitWith (ExitFailure 1)
and instead of exitWith ExitSuccess just return through main rather than
throwing an exception
3706428
Duncan Coutts dcoutts Update for Package and various utils having moved modules
Several of the general util functions in Hackage.Utils are now in the main
Cabal lib in Distribution.Simple.Utils so we use those.
The Package class moved into Distribution.Package.
Use the packageId class function in more places.
c31ccb8
Duncan Coutts dcoutts Handle unpacking failures slightly more gracefully
And note problem #246 about unpacking tar files with links
503225f
Commits on Feb 23, 2008
Duncan Coutts dcoutts Print output as UTF8 64141da
Duncan Coutts dcoutts Depend on latest Cabal lib c9f74da
Commits on Feb 24, 2008
Duncan Coutts dcoutts Convert to using readTextFile as appropriate
Added readBinaryFile for on use (uploading .tar.gz files)
Remove readURI as it was not being used.
118eff1
Commits on Feb 25, 2008
Duncan Coutts dcoutts Read package descriptions from the index as UTF8 7fc668a
Commits on Feb 27, 2008
Duncan Coutts dcoutts Take nub by package id when making a dep graph
and give more detailed error messages for internal error conditions.
Fixes a problem where installing a set of packages where several depended
on the same package would give us a ResolvedDependency list containing
multiple copies of that package. The DepGraph was expecting unique packages.
Resolving package deps and generating install plans needs more thought
and better specified invariants.
5cf1599
Commits on Feb 28, 2008
Duncan Coutts dcoutts Revert to ordinary read/writeFile for the config file a258fb4
Lennart Kolmodin kolmodin Implement --dry-run for 'cabal install' a723329
Commits on Feb 29, 2008
Duncan Coutts dcoutts Add --dry-run to upgrade, replacing existing info message
Also adjust the default for --dry-run to be false rather than empty.
06f122b
Duncan Coutts dcoutts Remove 'info' command, make --dry-run cover that feature
In -v mode info produced a detailed tree explaining the dependency
resolution. That feature has been moved into 'install --dry-run -v'.
4b24be7
Commits on Mar 01, 2008
Lennart Kolmodin kolmodin Improve 'cabal list'
Make the output of 'cabal list' prettier. 
$ cabal list xmonad
 * xmonad
      Latest version available: 0.6
      Latest installed version: 0.6
      Homepage: http://xmonad.org
      Category: System
      Synopsis: A tiling window manager
      License:  BSD3
 * xmonad-contrib ...[snip]
Very much like the gentoo tools eix and esearch.
This targets part of ticket #235. It still does not show packages that are
installed but not available.
15d8843
Lennart Kolmodin kolmodin Implement --installed to 'cabal list'
Adding --installed to 'cabal list' will make it print only packages that are
installed.
e79f6a4
Commits on Mar 02, 2008
Lennart Kolmodin kolmodin Implement 'cabal list --simple-output'
Provides a output format that is easier to pass on to unix tools and other
scripting tools. Also works together with --installed.
14d263e
Lennart Kolmodin kolmodin Remove shortopt -I for --installed 19d47fe
Commits on Mar 03, 2008
Duncan Coutts dcoutts In 'list', also include packages that are only installed and not avai…
…lable

Previously we took the available packages and did an inner join with the
installed packages so we missed out packages like base which are installed
by not available. Now we get the selected installed and available package
sets and do a full outer join using a sort and merge operation.
Also use a proper data type to hold the info we print about each package.
e1730e4
Duncan Coutts dcoutts Fix savedConfigToConfigFlags so the command line overrides the config
"cabal configure --global" was incorrectly passing the user prefix to setup.
36b0c36
Duncan Coutts dcoutts Fix fromFlag bug and use default flags for list command 4b88758
Lennart Kolmodin kolmodin CLI completion: Add completion of packages
Add completion of packages to the commands install, list, upgrade and fetch.
Only complete packages if the user is not trying to complete a flag.
Complete with package-versions if the package name ends with a dash,
otherwise just complete with the package names.
b4a6107
Duncan Coutts dcoutts Update for recent Cabal lib api and behaviour changes
Depend on latest Cabal lib version and bump our own version due to recent
feature additions and removal of the 'info' command.
7f58681
Duncan Coutts dcoutts Instead of Setup.lhs use .hs like everyone else does 429f782
Commits on Mar 04, 2008
Lennart Kolmodin kolmodin Fix defect when unpacking tar files containing links
There were two issues;
  * Unpacking links that point to files not yet unpacked
  * Used the link target as absolute path, but it's relative
This patch addresses both issues, which is ticket #246.
There may still be errors if a link refer to another link which has not
been unpacked yet.
62d6605
Brent Yorgey byorgey Hackage/List.hs: port showPackageInfo to pretty-printing combinators,…
… improve display of packages with multi-line synopses
2cd06a3
Commits on Mar 05, 2008
Duncan Coutts dcoutts Attempt to make things work using hugs, assume everything is installed f26ec48
Brent Yorgey byorgey Hackage/List.hs: reflow paragraphs when displaying synopsis/description. e106334
Commits on Mar 06, 2008
Duncan Coutts dcoutts Use new buildOS and buildArch 066c09b
Andrea Vezzosi Saizan Implement CLI flag --root-cmd for 'cabal install' as in #202
It also adds the internal flag --only so we can avoid building a setup when build-type == Simple.
8d5b8de
Commits on Mar 07, 2008
Brent Yorgey byorgey List.hs: fix synopsis paragraph wrapping 4c56a72
Commits on Mar 10, 2008
Duncan Coutts dcoutts Make the 'upload' command more self explanatory
It tells you what to do if you don't supply any args, rather than doing
nothing and it check for simple mistakes and gives helpful error messages.
e82bb5a
Duncan Coutts dcoutts Adapt to using the bundled ReadP
+1 for using the same version of the ReadP lib everywhere,
previously we would only have noticed this type error with nhc98.
31f1a9b
Commits on Mar 12, 2008
Duncan Coutts dcoutts Parse filepaths in the config file the same way as in .cabal files
That is, allow quoted and unquoted paths.
05ee9a0
Commits on Mar 18, 2008
Andrea Vezzosi Saizan FIX #40, now cabal sdist creates the archive using Hackage.Tar
we don't call setup sdist anymore but we use functions from Distribution.Simple.SrcDist
d6ee9ca
Andrea Vezzosi Saizan fix imports, because Dependency has moved in Cabal d164042
Commits on Mar 19, 2008
Duncan Coutts dcoutts Refactor the SrcDist code in a similar way as in the Cabal lib 1c4ce5c
Duncan Coutts dcoutts Minor changes to the tar packing code
Use lazy bytestring when packing tar entry headers rather than strict and
then making a single chunk lazy bytestring later. The lazy bytestring pack
will only generate a single chunk for a String that short (<4k).
Use openBinaryFile rather than openFile + hSetBinaryMode.
Add a haddock module header with copyright note.
6d8cacd
Duncan Coutts dcoutts Use relative paths when makeing tar.gz rather than changing current dir
The current directory is a global variable, we should not mutate it.
So instead, pass a base and relative path when generating tar entries.
Also change sanitizePath to be pure and use FilePath.Poisx.
4a6b172
Duncan Coutts dcoutts Simplify the tar code a bit more
We always know the base path for construction or extraction so don't
bother using Maybe FilePath. Also use GZip qualified.
c57cb19
Duncan Coutts dcoutts Record and report the exceptions that cause build failure
When installing a bunch of package we have to catch exceptions since
we carry on building other packages that did not depend on the
failing package. We were recording what phase the failure was in but
not the actual exception. We now record that too and print it along
with the more general explanation of what package failed and in
which phase. It's not perfect, eg when a package fails to compile we
end up printing that the exception was "ExitFailure 1" which is not
very useful.
82c7bfe
Pepe Iborra pepeiborra #223 part2: Support all the configure options in the config file
This patch takes advantage of the new OptionField structure in Distribution.Simple.Command
to provide support for all the configure command line options in the .cabal/config file.
This has a global effect on all the packages managed by cabal-install.

The ticket also mentions support for per-package sections in the config file. This patch
does not take care of that.
876cafd
Duncan Coutts dcoutts Bump version and require latest Cabal lib version 4605c2f
Commits on Mar 20, 2008
Andrea Vezzosi Saizan fix small bug in Hackage.Tar
The baseDir was passed instead of the full path.
aef13ed
Commits on Mar 25, 2008
Duncan Coutts dcoutts Use the new Text class all over
Mostly just changing showVersion, showPackageId to display instead
6bb4403
Commits on Mar 27, 2008
Duncan Coutts dcoutts Update to recent Cabal lib changes e433203
Commits on Mar 29, 2008
Duncan Coutts dcoutts Use new showPWarning for warnings in parsing the config file 75c8981
Duncan Coutts dcoutts Bump version number and depend on the latest Cabal lib d046843
Duncan Coutts dcoutts TAG 0.4.6 57118e2
Commits on Mar 30, 2008
Spencer Janssen Add missing modules in other-modules, fixes sdist 0557c53
Commits on Apr 12, 2008
unknown Half-done build reporting stuff 733e00d
Commits on Apr 13, 2008
Duncan Coutts dcoutts Update for change to finalizePackageDescription 6c61d79
Duncan Coutts dcoutts Relax version constraint on HTTP, seems to work with 3001.1 2fba4c5
Duncan Coutts dcoutts Make ResolvedDependency an internal detail of dependency calculation
Externally we currently use a DepGraph, though we'll move to a InstallPlan.
This is a step towards making it easier to swap in different package
dependency resolution algorithms. Because we're hiding ResolvedDependency
we have to disable the extended Hackage.Info stuff for the moment.
85af1b5
Commits on Apr 14, 2008
Duncan Coutts dcoutts Change resolveDependencies to take OS and Arch as parameters
Rather than using global 'constants' for the current os and arch.
eab8390
Duncan Coutts dcoutts Simplify install --only implementation
The install --only doesn't do any planning or build
reporting so make it completely separate so we do
not have to make up fake build plans or results.
1c79ec0
Duncan Coutts dcoutts Add new InstallPlan type
This is joint work with Kolmodin.
An InstallPlan records what we want to install and records the outcome
of installing packages. It has a fairly strict internal invariant which
should guarantee that each package can be configured sucessfully.
7757375
Commits on Apr 20, 2008
Duncan Coutts dcoutts Update for FlagAssignment changes d82dcb8
Commits on Apr 23, 2008
Duncan Coutts dcoutts Update for checkPackage change 286c9d9
Commits on Apr 24, 2008
Duncan Coutts dcoutts Rearange install plan checking code
Make it usable for callers that want to check
properties before constructing an InstallPlan.
be79957
Commits on Apr 30, 2008
Duncan Coutts dcoutts Make the default SavedConfig contain empty rather than default Config…
…Flags

We do not want to pass a load of default command line flags. We only want
to pass flags where we're overriding the defaults.
Also it's because old Cabal versions do not understand new flags.
50d9a3d
Duncan Coutts dcoutts Simplify the way we derive configure, install and upgrade commands
so we do not accidentally inherit the default flags for the underlying
configure command when we in fact want the empty flags. I am beginning
to suspect that having any defaults at all was a mistake.
e7c7a13
Duncan Coutts dcoutts Add replacement SetupWrapper module
Clearer code and a wider interface to give more control.
2bdbd3b
Duncan Coutts dcoutts Fix setupWrapper bug, when no compiler was configured bca6875
Duncan Coutts dcoutts Convert Main to use the new SetupWrapper module f1d9b86
Duncan Coutts dcoutts Add a new --cabal-lib-version flag to the install command
It's used to select which version of the Cabal lib to use when
configuring, building and installing packages. It's mainly so that
we can use cabal-install to help us test that packages build ok with
both old and new versions of the Cabal library. In particular we'd
like to check every package on hackage to make sure that new Cabal
versions are not breaking packages that worked with older versions.
facb7a7
Duncan Coutts dcoutts Convert the Install module to use the new SetupWrapper
And refactor slightly to batch some of the misc parameters
together in a record rather than passing them all separately.
e785bcf
Duncan Coutts dcoutts Generalise and rename PkgInfo to include local packages
Renamed to AvailablePackage since that what it is really.
Now instead of just representing packages from a remote hackage repo
it includes an alternative for a local unpacked package. In future
we should add more alternatives, eg for other local packages (ie not
just the one that's unpacked in the current dir) and for remote
packages in source control like darcs, git etc.
0d193ef
Duncan Coutts dcoutts Remove the resolveDependenciesLocal, implement it via resolveDependen…
…cies

The local variant was for the case that we were starting from a package
description rather than a dependency to a named package. In the local
case we not only need to resolve the dependencies of the package but also
to find a flag assignment for the local package. This case crops up in
the resolver normally when we try to satisfy a dependency, we have to
pick a flag assignment for the dependency and resolve its dependencies.
It is annoying to have both entry points, especially as we want the
resolver to be plugable. So instead we define the local package as an
available package, then by resolving a single dependency on exactly the
name and version of the local package then we can get an install plan for
the local package. It also requires generalising installPkg to deal with
the local case.
eea3e95
Commits on May 01, 2008
Duncan Coutts dcoutts Don't echo when prompting for the hackage upload password.
Fixes ticket #268. And use newtypes for the username and password,
just to be more sure we're not mixing them up with other strings.
5a4efbd
Commits on May 04, 2008
Duncan Coutts dcoutts Update for flipped order of args for PackageIndex.insert cf360f5
Duncan Coutts dcoutts Add new utils, duplicates, duplicatesBy and mergeBy da50845
Duncan Coutts dcoutts Use the mergeBy from the Utils module 265ac95
Duncan Coutts dcoutts Improve InstallPlan error checking and reporting
Instead of just reporting that a plan is invalid, produce a
detailed list of reasons why it is invalid.
This should be useful for people debugging dependency resolvers.
Also rename the complete property to closed, since the property
is about the set being closed under the dependency relation.
Also re-use the PackageIndex functions for checking the validity
conditions rather than re-implementing the checks locally.
7b2bf34
Commits on May 05, 2008
Duncan Coutts dcoutts Packages are only invalid if they have more than zero problems. 11045f3
Duncan Coutts dcoutts Switch from DepGraph to InstallPlan
The dependency resolver has had to be extended in a slightly hacky
way to gather the extra information needed by an install plan. In
particular it requires the flags to use to configure each package,
the actual versions of dependencies to use and all of the
installed packages and their closure of dependencies.
However the current resolver is fairly naive and so can be easily
persuaded into producing an invalid install plan, in which case
you'll get a detailed list of reasons as to why it is invalid.
80742ee
Commits on May 06, 2008
Duncan Coutts dcoutts Add more info and debug messages at key parts of the install process
If we're in verbose mode then always print what we're going to
install, not just when the user specifies --dry-run.
84de281
Duncan Coutts dcoutts Hide the installed instance when installing the local package.
Otherwise the dependency resolver may decide to pick the installed
instance of the package but we really do want to install the local
version. So to remove that choice from the dep resolver we just
delete it from the installed package index.
9f59341
Duncan Coutts dcoutts Minor improvements to InstallPlan documentation and error reporting c32d24b
Commits on May 07, 2008
Duncan Coutts dcoutts Check that InstallPlan dependencies respect a state relation
For example it's not allowed for installed packages to depend
on configured packages.
a2b6785
Duncan Coutts dcoutts Add a dependency graph to the InstallPlan
Uses Data.Graph and annoyingly we also need to keep functions
around for mapping between Graph.Vertex <-> PackageIdentifier
0b5943e
Duncan Coutts dcoutts Add lookupConfiguredPackage helper function to InstallPlan
Simplifies implementation of completed and failed
731bb6d
Duncan Coutts dcoutts Reimplement InstallPlan.failed as it was completely wrong
It was finding all the dependencies of the failed package and
marking them as failed. But of course what we have to do is find
all the packages that depend on the failed package (the reverse
dependencies) and mark them as failed. We use the reverse
dependency Graph that we saved in the InstallPlan.
dab5405
Duncan Coutts dcoutts Add an info message when resolving dependencies
It can take a while, especially with debug checks turned on.
9672cec
Duncan Coutts dcoutts Hide broken installed packages when resolving dependencies
Stops us from choosing them which would always end up with an
invalid installation plan.
7a88312
Duncan Coutts dcoutts Move ConfiguredPackage type into Types module
It's not actually specific to the InstallPlan.
12b9161
Duncan Coutts dcoutts Refactor installLocalPackage and installRepoPackages
They share most code so pull the first and last bits out into the
top level install function. They now need 2 and 3 fewer params
respectively, which is a good sign. Rename them because they're
generating plans now rather than doing the installation directly.
aa5b400
Duncan Coutts dcoutts Tidy planLocalPackage and planRepoPackages a bit more 6201bdb
Duncan Coutts dcoutts executeInstallPlan now takes an installer instead of calling installPkg
Four of the executeInstallPlan param were just passed through directly
to installPkg so this decouples them a bit.
0f14355
Commits on May 08, 2008
Duncan Coutts dcoutts Restructure the package installing code
Previously each layer called the next layer down and therefore the
top layer had to take all of the params that the bottom layer needed
even though they were mostly or wholly unmodified on the way down.
Now each layer takes the next layer as a parameter so we do not need
to take the params that are not used directly by the current layer.
The overall stack is then built by applying each layer to the next.
38d5f57
Commits on May 09, 2008
Duncan Coutts dcoutts Change InstallPlan.done and .next into .ready that returns a list
So kind of like uncons style rather than null and head.
It returns all the ready ones by lazily so it's no extra expense.
It'll allow parallel installations since all ready packages are
independent of each other. Also update callers.
08270ba
Duncan Coutts dcoutts Change the result type of DependencyResolver
and add a wrapper that makes InstallPlans
f5dde86
Duncan Coutts dcoutts Make the existing dep resolvers to use the DependencyResolver interface
That is the standard naive dep resolver and the bogus one that has to
make up a plan assuming that all dependencies are installed.
5627af6
Duncan Coutts dcoutts Swap Either args so it's Either Error Ok
Which seems to be the normal convention.
899dbb3
Duncan Coutts dcoutts Split the two resolvers out of the Dependency module
It's clearer what is the generic stuff and what is specific to the
current resolver. So it should be a bit easier to swap in new ones.
6572f0a
Duncan Coutts dcoutts Put the check back in for hideBrokenPackages bebd7ed
Commits on May 10, 2008
Duncan Coutts dcoutts Rewrite getUpgradableDeps so it's simpler and linear time
Also change so that instead of giving the available package with
the highest version number (where that is higher than the installed
package) it gives us a dependency on a version of the package that
is strictly greater than the one installed. This is more flexible
since when resolving we do not necessarily have to pick the very
latest version if that turns out not to be possible.
c79ef75
Duncan Coutts dcoutts Move dryRun out of the misc options b7dbaeb
Duncan Coutts dcoutts Move printing of build failures into a separate function 9f4c73d
Duncan Coutts dcoutts Pull the planners out of install and pass them as parameters b2f4f98
Duncan Coutts dcoutts Move the upgrade action into the Install module
It shares most code anyway.
Also fixes ticket #260 becuase we use the right entry point now.
0152e89
Commits on May 12, 2008
Duncan Coutts dcoutts Update for distPref changes a349311
Commits on May 16, 2008
Duncan Coutts dcoutts Update for renamed PackageIndex.delete (now .deletePackageId) 5b4cd32
Commits on May 21, 2008
Duncan Coutts dcoutts Remove the silly failing resolver demo c31cbe1
Duncan Coutts dcoutts Hide any available base and ghc-prim packages from the dep resolver
Previously if the base package was available on hackage then the dep
resolver might try to upgrade it. Unfortunately that's almost
certainly technically impossible at the moment. So now since the dep
resolver does not see these available packages it cannot pick them.
This should fix ticket #174.
2f656c1
Commits on May 28, 2008
Duncan Coutts dcoutts Move common dependency resolver types into shared module ba4929b
Duncan Coutts dcoutts First version of the top-down package dependency resolver
This is a new dependency resolver that produces valid install plans.
It works in polynomial time however because the search space is 
exponential in size it is not guaranteed to find a solution even if
one exists. It works by generating and then exploring the search
space represented as a lazy tree. It uses constraints to prune
choices and heuristics when guesses are necessary. Currently it can
generate install plans for 99% of the packages on hackage. The
remaining 6 packages should be doable with two extra tricks.
It is not finished and is not yet usable in practice.
f123c66
Commits on May 29, 2008
Duncan Coutts dcoutts Bump version and depend on the latest Cabal from the 1.4 branch 5b36095
Duncan Coutts dcoutts Use thisPackageVersion and notThisPackageVersion from Distribution.Pa…
…ckage

rather than the local definitions
0540367
Duncan Coutts dcoutts Switch DependencyResolver to return Progress and String errors
rather than Either and structured error type [Dependency]. The reason
we cannot use that as a structured error type any more is because
missing dependencies is not the only failure reason. There are
several reasons, several of which are pretty complex. For now we'll
have to do with a human readable message. Perhaps we may be able to
find a common structured type that the different dep resolvers can
all agree on. I'm not hopeful however as error reporting seems to be
closely tied to the dep resolution approach.
d83e169
Commits on May 30, 2008
Duncan Coutts dcoutts Add resolveDependenciesWithProgress
nd clean up header info
a2f3ec8
Duncan Coutts dcoutts Switch install to use resolveDependenciesWithProgress
And show progress messages at verbosity level 2.
941e1dd
Duncan Coutts dcoutts Rearrange and tidy bits of the topdown resolver 7d078df
Duncan Coutts dcoutts As a heuristic, use topological order for the order of package choices
The general case in exploring the state space is that we have a set of
choices (package names) and for each choice we have a number of
versions of that package we could pick. If there's only one version of
a package then we make that choice first. Otherwise we have to pick
some package and select one of the available versions. The question is
which package should we make a choice for first? Previously we picked
completely arbitrarily. Surprisingly this actually works pretty well.
An improvement is to pick packages in topological order. This works
better because it allows dependencies from earlier choices to
constrain our later choices.
bb7f65f
Commits on Jun 02, 2008
Duncan Coutts dcoutts Implement plan improvement
The idea is to improve the plan by swapping a configured package for
an equivalent installed one. For a particular package the condition
is that the package be in a configured state, that a the same version
be already installed with the exact same dependencies and all the
packages in the plan that it depends on are in the installed state.
b075021
Andrea Vezzosi Saizan Fix bug in passing the verbosity value when re-executing cabal
It was passing the value as another argument, distinct from the flag.
7108a92
Duncan Coutts dcoutts Support top level dependency version constraints
and error messages for when they're unsatisfiable or conflict
cdeae5f
Duncan Coutts dcoutts Fix improvePlan so the index is updated incrementally
It's important since later packages can depend on earlier ones having
been changed from configured to pre-existing. That is afterall the
whole point of considering them in reverse toplogical order.
Also, remove duplicates in the dependencies list of installed
packages since ghc-pkg does not currently prevent duplicates in (eg
multiple depends on the same version of base). See ghc bug #2230.
67ea49a
Duncan Coutts dcoutts Change the DependencyResolver type to take a per-package version pref
And add a few global package version pref policies and use them in
ordinary install and upgrade. For install we use a policy that says
that we prefer the latest version of a package that we specifically
request and prefer the installed version of any other package. For
upgrade we simple always prefer the latest version. One can imageine
other policies where we prefer the latest version for only some
interesting subset of packages and installed otherwise.
No resolvers actually make use of this preference yet.
a3d8d36
Duncan Coutts dcoutts Make use of the package version preference in the top-down resolver 181bce1
Commits on Jun 03, 2008
Duncan Coutts dcoutts Make the 'upgrade' command take optional deps
Up to now 'upgrade' took no args and tried to upgrade all installed
packages to the latest versions. It retains that mode but also has
a new mode rather like 'cabal install'. The difference is that with
$ cabal install foo
it means install latest version of foo but otherwise prefer the
installed versions of deps of foo, while
$ cabal upgrade foo
means install the latest version of foo and also the latest
versions of all the dependencies of foo.
d7e3ac5
Duncan Coutts dcoutts Switch the defaultResolver to the new topDownResolver
Time for wider testing.
272ff91
Duncan Coutts dcoutts Bump version number to help with bug reports
The new resolver is a significant change in behavior so it's
useful to know when people report problems.
13cae5d
Duncan Coutts dcoutts Don't include the default repo when loading the config file
So we don't end up downloading the index from hackage twice.
fe22751
Duncan Coutts dcoutts Check the InstallPlan invariant on updates and not on reads b4f78d3
Duncan Coutts dcoutts Update the README file 743181b
Duncan Coutts dcoutts Remove obsolete TODO 7e2d704
Duncan Coutts dcoutts Update copyright dates and holders in LICENSE file 4541530
Duncan Coutts dcoutts Update synopsis and description e6bab63
Commits on Jun 04, 2008
Duncan Coutts dcoutts Turn on assertion checking even in -O builds
Although it is expensive, we want to catch problems early.
f8516bb
Duncan Coutts dcoutts Failed packages can still depend on configured packages
This is because a package can depend on several packages and if one
of the deps fail then it fails but it still depend on the others
that did not fail. This fixes an assertion failure in larger builds.
e240251
Duncan Coutts dcoutts Fix for marking reverse deps of failed packages
The reverse deps may have already failed due to depending on another
failed package. So do not assume all reverse deps are in the
configured state. If they are in the failed state then ignore them.
f2a0cc8
Commits on Jun 05, 2008
Duncan Coutts dcoutts When marking failed reverse deps, don't include the package itself
Otherwise we end up saying packages failed because they depend
on themselves which failed to install, which is silly.
b947509
Commits on Jun 06, 2008
Duncan Coutts dcoutts Rearrange setup wrapper to know the cabal lib version
It is important to know which version of the Cabal lib the setup
script has been built with because it affects what flags we can pass
to it. So we now store the version in dist/setup/setup.version.
If the version number changes then we rebuild the setup binary.
e78187b
Duncan Coutts dcoutts Filter the configure flags based on the Cabal lib version
Allows us to use cabal-install to build packages where we build the
Setup.hs script using an older version of the Cabal library.
This is important for packages that claim to need an older version
and it's also pretty useful for testing.
a2fe4d7
Duncan Coutts dcoutts Adapt to changes in Cabal library 1.4 branch 7d50938
Duncan Coutts dcoutts Fix haddock markup 26224a6
Duncan Coutts dcoutts trivial doc improvement and unused name fix 5366a8d
Duncan Coutts dcoutts Bring the reporting module slightly closer to reality 8c49419
Duncan Coutts dcoutts Bump version number 65e9644
Duncan Coutts dcoutts Add Hackage.Reporting to other-modules 77d120b
Duncan Coutts dcoutts TAG 0.4.9 be871e9
Commits on Jun 07, 2008
Duncan Coutts dcoutts Only inspect the needed parts of the installed and available indexes
The available package index is loaded lazily so if we can avoid
forcing all the packages then we can save a huge amount of slow text
parsing. So select out the maximal subset of the index that we could
ever need based on the names of the packages we want to install. For
the common case of installing just one or two packages this cuts
down the number of packages we look at by a couple orders of
magnitude. This does not help with the installed index which is read
strictly, though most people do not (yet) have hundreds of installed
packages, so that's less of an immediate problem.
0789adf
Duncan Coutts dcoutts Use a smarter preference when picking a Cabal lib to build Setup.hs
Instead of just using the latest version we use the best version
according to the following preferences in priority order:
- the same version as cabal-install was itself built with
- the same major version number as cabal-install was built with
- a stable version of Cabal (even second digit of major number)
- the latest version
3d7a811
Commits on Jun 08, 2008
Duncan Coutts dcoutts First cut at generating build reports 2b7af78
Duncan Coutts dcoutts Use proper URI type rather than String 905fdd0
Duncan Coutts dcoutts Include the hackage server in the build report
This is so that we remember which server to send the reports to.
This is pretty important if you're using a private as well as a
public hackage server.
7a0721a
Commits on Jun 09, 2008
Duncan Coutts dcoutts Use a readable external formar for build reports 4ed1981
Commits on Jun 10, 2008
Duncan Coutts dcoutts Fix parsing of build reports
and add a function to parse a whole logfile of reports
44745c8
Duncan Coutts dcoutts Put build-reports into per-server dirs
Don't bother putting the server url into each report
since we do not want to upload that information anyway.
cf67464
Duncan Coutts dcoutts Fix printing of flags in build reports 074ac9e
Duncan Coutts dcoutts Put the build client it into the build reports 7b7a808
Duncan Coutts dcoutts Put the configurations flags into each UnresolvedDependency
We don't actually have per-package flags yet. All -f flags
on the install/upgrade command line apply to every paclage.
7a54b87
Duncan Coutts dcoutts Take the the flag assignment into account in the resolver
so it now actually works to say: $ cabal install foo -fbar
b5fa948
Commits on Jun 12, 2008
Duncan Coutts dcoutts Put upper bounds on all the build-depends 3a0c26c
Duncan Coutts dcoutts Update to minor change in Cabal-1.4 and fix a warning. d4bf39a
Duncan Coutts dcoutts Include the bash-completion code in the tarball 1636e97
Duncan Coutts dcoutts Bump the version to 0.5.0 bbbf1d7
Duncan Coutts dcoutts TAG 0.5.0 e62c513
Commits on Jun 13, 2008
Duncan Coutts dcoutts The update command doesn't take any extra args 0f37a4b
Commits on Jun 16, 2008
Duncan Coutts dcoutts Try and pick up the http proxy on windows correctly
Takes account of the ProxyEnabled reg key
Allow proxy uris that lack the http:// uri schema.
This should really be moved into the HTTP package.
f07bb40
Duncan Coutts dcoutts Move getAvailablePackages into IndexUtils module 2d0b76e
Duncan Coutts dcoutts Use standard thisPackageVersion rather than inlined definition 8d5b92f
Duncan Coutts dcoutts Overhaul the bogus dependency resolver so it works again
The bogusResolver is used for compilers like hugs and nhc98 where
we do not know what packages are already installed. We do it by
altering the descriptions of the packages we're going to install
to remove all of their dependencies. Doing this gives us a valid
install plan. We rely on hope to minimise the difference between
this install plan and reality.
a3fa8a1
Duncan Coutts dcoutts Default to global installs on Windows
User installs by default elsewhere. Note that this default only
affects new config files. Existing windows users will need to
change their config file or delete it and let it be re-created.
ab74690
Commits on Jun 17, 2008
Duncan Coutts dcoutts Bump the version to 0.5.1 1c2d3d1
Duncan Coutts dcoutts TAG 0.5.1 0b5a44d
Commits on Jun 18, 2008
Duncan Coutts dcoutts Fix the upload command message about the location of the config file deb9db0
Commits on Jun 19, 2008
Duncan Coutts dcoutts Add initial build logging, based on reporting code 8868c29
Commits on Jun 23, 2008
Duncan Coutts dcoutts Fix for when user supplies incorrect upload username/passwd
Should now return a proper error rather than an internal
error from the HTTP library.
22e4e41
Commits on Jul 25, 2008
gwern gwern cabal-install.cabal: fix build-from-sdist failure 4951143
Commits on Jul 30, 2008
Duncan Coutts dcoutts Move modules under Distribution.Client
And tidy some imports slightly
d5856c2
Duncan Coutts dcoutts Add support to SetupWrapper for logging setup output to a handle
or for using a diiferent initial working directory. We already
need to use a different working dir and this would allow us to
spawn multiple setup processes for parallel builds each with
their own working dir. Also, we want to be able to capture the
output of builds. At the moment our internal logging framework
is not capable of redirecting, but if we launch a process we
redirect its output to a file. This should be useful for build
reporting where we want logs for each individual package.
ae2f586
Duncan Coutts dcoutts Move the install command options so they're not toplevel decls
Except for optionDryRun which is shared with another command.
0128853
Duncan Coutts dcoutts Use the external setup method when logging the output
For the internal method, change to the right working dir if necessary.
7653a2d
Duncan Coutts dcoutts Use the setupWrapper useWorkingDir feature in Install
Rather than calling inDir directly.
48ceef8
Duncan Coutts dcoutts When launching setup in another dir we must use an adjusted path
The path to the binary we're running must be accessable from
that other directory. The fix is to use currentDir </> setup
3f6de4e
Duncan Coutts dcoutts Make the upgrade command take all the install command flags d9cce45
Duncan Coutts dcoutts Add install --log-builds flag
Eg can use cabal install foo --log-builds='$pkgid-$compiler.log'
and the build log for each package will written to a separate
file. If an existing file is given then the log is appended.
This or something like it should help in future with build
reporting of the non-anonymous kind.
2ad1316
Commits on Aug 02, 2008
Duncan Coutts dcoutts Remove the unused module Distribution.Client.Clean ae2fa8e
Duncan Coutts dcoutts Fix changing working dir when calling external setup but not logging
Now uses a single code path for both modes.
f5adf72
Duncan Coutts dcoutts Pass dist dir and verbosity flags to build and install phases b558cc3
Duncan Coutts dcoutts Add feature to symlink binaries into another dir
This covers the major part of ticket #289.
c6a7252
Duncan Coutts dcoutts Add a symlink-bindir field to the config file
and link it up with the symlink feature code.
3fc8984
Duncan Coutts dcoutts Bump minor version number 3f2e151
Duncan Coutts dcoutts Fix generating haddock docs 41214fd
Duncan Coutts dcoutts Warn about symlinks that could not be created 2a6d52c
Duncan Coutts dcoutts Add a LocalRepo kind of Repo and refactor the Fetch code
This is the groundwork needed to support local repositories,
that is ones acessable via the local filesystem and without
a corresponding download cache. They use the same format/layout
as the download cache of a remote repo.
f58a070
Commits on Aug 03, 2008
Duncan Coutts dcoutts Use the given working dir when preparing to call setup
I introduced a subtle bug with paths when I stopped using inDir
outside of setupWrapper. It was using the current dir to find
Setup.hs rather than the target dir. That ofen works because
there's a Setup.hs in the local dir. I think it's now fixed to
always use paths relative to workingDir. As before, it invokes
the setup binary giving it the new working dir.
5f9bead
Commits on Aug 05, 2008
Duncan Coutts dcoutts Refactor BuildResult type and related types
Split BuildResult into Either BuildFailure BuildSuccess
Make BuildSuccess contain info for docs and tests.
Make PlanPackage use BuildSuccess and BuildFailure directly
rather than being parameterised by any build result type.
This has a knock on effect on lots of other types which
were parameterised just because PlanPackage was.
7359969
Duncan Coutts dcoutts Initial support for building haddock docs
No flag to turn it on/off yet.
c921937
Commits on Aug 06, 2008
Duncan Coutts dcoutts Shrink the size of the ParseUtils module
Really it should be eleminated entirely.
9b65ae5
Duncan Coutts dcoutts Remove showFields
use the pre-existing ppFields
ed0029a
Duncan Coutts dcoutts Use a local copy of the new parseFields from Cabal lib
We can remove the local copy once we switch to the next
Cabal version. In the mean time, the code is at least sane
and consistent between libs.
213d97d
Duncan Coutts dcoutts Don't require config file fields to have "" for empty values
And make the parsing slightly nicer.
74df571
Duncan Coutts dcoutts Rearrange the symlinking code slightly
Will make it easier to create the bin dir, if that's what we want to do.
b1eec59
Duncan Coutts dcoutts Ignore local files when compiling Setup.hs c4f4081
Duncan Coutts dcoutts Add --enable/disable-documentation flag.
This addresses most of ticket #206.
d953274
Commits on Aug 07, 2008
Duncan Coutts dcoutts Rearrange the BuildReport code dfeab5c
Lemmih Lemmih Simple upload support for build reports. fb021e3
Duncan Coutts dcoutts Fix up other-modules list 5c757ca
Duncan Coutts dcoutts Fix BuildReport parser 69e7ef5
Commits on Aug 08, 2008
Duncan Coutts dcoutts Add defaultLogsDir util and use it for storing build reports ed978fc
Duncan Coutts dcoutts Add --build-reports install flag 00bb6d4
Duncan Coutts dcoutts Implement --build-reports flag df8e634
Duncan Coutts dcoutts Add command line UI for 'report' action. 76499cb
Duncan Coutts dcoutts Add verbosity flag to report command b99939e
Lemmih Lemmih Store detailed build logs. 9e82124
Lemmih Lemmih First stab at uploading the detailed logs. 4d5d1c6
Duncan Coutts dcoutts Create the logs dir 9905fb1
Duncan Coutts dcoutts Fix the urls for the new hackage server 966af5b
Lemmih Lemmih Only look at .log files. 5db611b
Lemmih Lemmih Use correct uri to /buildreports a4e2466
Lemmih Lemmih silly types. 9aa31c9
Commits on Aug 10, 2008
Lemmih Lemmih Support legacy download and upload urls. 64c37e9
Lemmih Lemmih Print upload error messages if they are in text/plain. 7bda173
Duncan Coutts dcoutts Remove most warnings from BuildReports.Upload module 63e952d
Commits on Aug 12, 2008
Duncan Coutts dcoutts Use a more specific type in one place in SetupWrapper
It doesn't need access to the whole Packagedescription,
it only needs the the PackageIdentifier.
f4033e2
Duncan Coutts dcoutts Regig install pipeline, pass the PackageDescription
Rather than the GenericPackageDescription.
bdb62df
Duncan Coutts dcoutts Fix building on Windows
I hateses #ifdefs
5a47c22
Duncan Coutts dcoutts Add missing module to other-modules 9bc2a78
Duncan Coutts dcoutts Clean up some warnings 2428f90
Duncan Coutts dcoutts Allow cabal-install to re-install itself on Windows
This is a fairly heavyweight solution, but then it's quite
a nasty problem. What we do is when we notice that we're
about to install something in place of our own .exe file,
we move our exe file out of the way (but in the same dir).
Then after we've installed the new exe we call it and ask
it to delete the old file (so we do not litter the bin dir
with lots of old versions). That requires synchronising
between the old and new programs and for the new program
to understand a command to do the syncing and deleting of
the old program. Lots of Win32 FFI imports. :-(
On the plus side it seems to work and is transparent to
the user and the rest of cabal-install. In particular the
actual file-installation code (which is burried deep
within Cabal) does not need to know about the special case
of installing over our own exe file.
feaee5f
Duncan Coutts dcoutts Don't fail if we don't sync with the child
It just means we leave a temp file around in the bin dir.
709bb98
Commits on Aug 14, 2008
Duncan Coutts dcoutts Fetch packages even if they happen to already be installed
Though obviously not if they have already been fetched.
This lets people study the source for core packages that
came with their compiler say, so they did not get have the
sources downloaded via cabal-install. Fixes ticket #297.
853025d
Duncan Coutts dcoutts Add cabal install --reinstall flag
to force reinstall of package where we have the exact same
version already installed. Ordinarily we would say that
there is nothing to do as the exact same package version
is already installed. There are some cases where you might
want to do this, eg to rebuild with different compiler
options, or adding/removing components (since we do not
track those indifidually yet, eg docs, profiling libs).
80994e5
Duncan Coutts dcoutts Only look for detailed build reports if we were generating them e123e28
Duncan Coutts dcoutts Always print the message about nothing to install
Not just if the user specified -v or --dry-run. Otherwise
it's rather confusing. Also clarify that the reason there
is nothing to install is because the latest versions are
installed already. Also mention the --reinstall flag:
  Resolving dependencies...
  No packages to be installed. All the requested packages
  are already installed. If you want to reinstall anyway
  then use the --reinstall flag.
f4f9eda
Commits on Aug 15, 2008
Duncan Coutts dcoutts allow tilde in hackage server URIs
report and fix from Nicolas Frisby <nicolas.frisby@gmail.com>
(code had changed slightly so the original patch didn't apply cleanly)
bbc0a8c
Commits on Aug 21, 2008
Duncan Coutts dcoutts Rearrange config settings and global command line settings
The intention here is to have the config file content and parser
be derivied from the command line types and flags. Now instead
of having a saved config type that contains additional
information to that kept in command line parameters we now put
all the information in the command line settings type and make
the saved config just the aggregation of the settings for
various key commands like configure, install, upload. There's
also an extended GlobalFlags type with the things like repos,
cache dir etc. When we generate the initial config file we put
in commented out versions of all (non-deprecated) valid fields,
along with their default values. The aim is to make the config
file self-documenting.
be2048c
Commits on Aug 22, 2008
Duncan Coutts dcoutts Add back separate user and global sets of install dirs
The user install setting selects between the two sets of dirs.
At the moment it's just the "user-" and "global-" prefixed field
names to support existing config files.
10f2b94
Duncan Coutts dcoutts Add sections for user/global install-dirs to the config file
So it looks like:
install-dirs user
  prefix: /home/username/.cabal
  ...
Rather than using user-prefix, global-prefix, etc etc for each
field. The old field names are still recognised but not added
into the initial config file.
3d8e734
Duncan Coutts dcoutts Add symlink-bindir flag to install/upgrade command
Was previously only available in the config file.
12c89e0
Duncan Coutts dcoutts Add changelog
I can only trace the history back to the 0.3 era.
c708cee
Duncan Coutts dcoutts Actually use the saved install flags when installing 1ac3aee
Duncan Coutts dcoutts add bootstrap shell script
At the request of Bjorn.
c96e4b7
Duncan Coutts dcoutts Exclude various fields from the config file
Excluded fields that make sense as command line flags but do
not make sense to use every time by saving in the config file.
1afc8d5
Duncan Coutts dcoutts Don't override config with install defaults 893119f
Duncan Coutts dcoutts Remove old unused modules and supporting util code 2ce6c54
Duncan Coutts dcoutts Improve the error handling and error message for missing repo index f…
…iles
6ff43d4
Duncan Coutts dcoutts Decompress the repo index atomically.
So if decompression fails (eg if the index is corrupt) then
the decompressed file does not get (partially) written.
4034f55
Duncan Coutts dcoutts Improve the HTTP error message slightly and note some TODOs 921a9e5
Commits on Aug 24, 2008
Duncan Coutts dcoutts Use updated tar code
Much more robust. Correctly detects trucated archives.
e71d4ff
Duncan Coutts dcoutts Be less strict in requirements of upgrade
Require current or later version, rather than strictly later
verison. There may be dependencies that cannot be upgraded.
0cd5eb0
Duncan Coutts dcoutts Use the right options when compiling external Setup prog
So the cabal version constraint is actually passed in.
This got lost in a previous refactoring.
6f0baaf
Commits on Aug 26, 2008
Duncan Coutts dcoutts Adjust config defaults again
Hopefully a bit clearer now and also means we pass the right
flags to Setup that were compiled with older versions of Cabal.
12ee55c
Duncan Coutts dcoutts Add release date of 0.5.2 2d53a4e
Duncan Coutts dcoutts Fix haddock syntax 81627fa
Duncan Coutts dcoutts Fix up the bootstrap.sh and include it in the tarball bb96e42