Commit graph

10508 commits

Author SHA1 Message Date
Eelco Dolstra
4b7b0bd12c * Started on the introduction. 2003-08-07 15:27:14 +00:00
Eelco Dolstra
74867e72f2 * Start of manual; installation instructions. 2003-08-07 14:17:18 +00:00
Eelco Dolstra
f8035d06f2 * Allow a name to be given to a system configuration through `--name
NAME'.  E.g., on the losser Subversion server, I do `nix-switch --name 
  svn $(fix ...)' to atomically upgrade the server (the SVN server 
  uses the Apache and Subversion installations in /nix/var/nix/links/svn).
2003-08-06 14:48:29 +00:00
Eelco Dolstra
9ad39df282 * `==' is not a valid operator. 2003-08-06 10:00:30 +00:00
Eelco Dolstra
d551062ec4 * Scan for wget and use the full path in fetchurl.sh.
* Use nix-hash (not md5sum) in fetchurl.sh.
2003-08-06 09:35:05 +00:00
Eelco Dolstra
236eb59293 * Allow locks on paths to be acquired recursively (that is, if the
process is already holding a lock on a path, it may acquire the lock
  again without blocking or failing).  (This might be dangerous, not
  sure).  Necessary for fast builds to work.
2003-08-06 09:34:04 +00:00
Eelco Dolstra
720f06e3b0 * A flag `--flat' to just compute the MD5 checksum of the contents of
a regular file.  I.e., `nix-hash --flat' is equivalent to the
  coreutils `md5sum' command (which doesn't exist on all systems).
2003-08-06 09:06:32 +00:00
Eelco Dolstra
37483672d4 * App -> Call.
* Allow booleans in package environment bindings (True maps to "1",
  False maps to "").
2003-08-06 09:05:04 +00:00
Eelco Dolstra
d34b4d4f28 * Conditionals. 2003-08-05 13:05:30 +00:00
Eelco Dolstra
b9c9b461ea * Made nix-push much faster. 2003-08-05 12:30:06 +00:00
Eelco Dolstra
4ce652640b * Cache result of fstatePaths(). TODO: do this in fstore.cc. 2003-08-05 12:29:47 +00:00
Eelco Dolstra
fd30f52cfc * Made nix-pull much faster by performing all Fix instantiations at
the same time.
2003-08-05 11:14:24 +00:00
Eelco Dolstra
17f05dba77 * Allow the top-level expression to be a list of expressions that
normalise to Nix expression.
2003-08-05 11:13:38 +00:00
Eelco Dolstra
d6b6b2d3a8 * Delete obstructed paths prior to building. 2003-08-05 09:47:20 +00:00
Eelco Dolstra
d2e963f7a3 * Path locking in addToStore() and expandPath(). 2003-08-04 07:09:36 +00:00
Eelco Dolstra
c95b4ad290 * In normaliseFState(), wrap registration of the output paths and the
normal form in a single transaction to ensure that if we crash,
  either everything is registered or nothing is.  This is for
  recoverability: unregistered paths in the store can be deleted
  arbitrarily, while registered paths can only be deleted by running
  the garbage collector.
2003-08-01 15:41:47 +00:00
Eelco Dolstra
d99d04e644 * Defensive programming against POSIX locking idiocy.
* Simplified realiseSlice().
2003-08-01 15:06:23 +00:00
Eelco Dolstra
545145cd58 * normaliseFState() now locks all output paths prior to building, thus
ensuring that simultaneous invocations of Nix don't clobber
  each other's  builds.

* Fixed a bug in `make install'.
2003-08-01 14:11:19 +00:00
Eelco Dolstra
9df93f30bd * Don't use substitutes in addToStore(). 2003-08-01 09:01:51 +00:00
Eelco Dolstra
06434072e7 * Put the database verifier in a transaction. 2003-07-31 19:49:11 +00:00
Eelco Dolstra
06d3d7355d * Enclose most operations that update the database in transactions.
* Open all database tables (Db objects) at initialisation time, not
  every time they are used.  This is necessary because tables have to
  outlive all transactions that refer to them.
2003-07-31 16:05:35 +00:00
Eelco Dolstra
177a7782ae * Use a more reasonable log file size (256 KB instead of 10 MB).
* Checkpoint on exit.
2003-07-31 14:28:49 +00:00
Eelco Dolstra
4a013962bd * Started using Berkeley DB environments. This is necessary for
transaction support (but we don't actually use transactions yet).
2003-07-31 13:47:13 +00:00
Eelco Dolstra
758bd4673a * Set execute bit. 2003-07-31 13:13:27 +00:00
Eelco Dolstra
9f4c19276d * Basic makefile. 2003-07-31 13:13:13 +00:00
Eelco Dolstra
26ff1cdf89 * A better test case for Nix race conditions. 2003-07-30 14:40:46 +00:00
Eelco Dolstra
64c617e984 * Directories for the manual. 2003-07-30 14:40:18 +00:00
Eelco Dolstra
2ac02440dc * Test cases for races. 2003-07-30 13:35:46 +00:00
Eelco Dolstra
aaee69cfde * INSTALL_DATA -> INSTALL_PROGRAM to ensure that the execute bit
remains set.
2003-07-30 10:14:58 +00:00
Eelco Dolstra
83075304e5 * Don't make the builder executable. 2003-07-30 09:49:47 +00:00
Eelco Dolstra
1cb030736e * Bug: Fix does not allow empty names, so don't generate them. 2003-07-29 17:56:39 +00:00
Eelco Dolstra
a01629894d * Use `--query --requisites' and include successors when pushing. Don't
use `--query --generators' anymore.
2003-07-29 15:19:03 +00:00
Eelco Dolstra
40f32ae00a * Typo: if -> elsif. 2003-07-29 14:42:14 +00:00
Eelco Dolstra
8846465934 * Get garbage collection and cache population to work *properly*.
Renamed `fstateRefs' to `fstateRequisites'.  The semantics of this
  function is that it returns a list of all paths necessary to realise
  a given expression.  For a derive expression, this is the union of
  requisites of the inputs; for a slice expression, it is the path of
  each element in the slice.  Also included are the paths of the
  expressions themselves.  Optionally, one can also include the
  requisites of successor expressions (to recycle intermediate
  results).

* `nix-switch' now distinguishes between an expression and its normal
  form.  Usually, only the normal form is registered as a root of the
  garbage collector.  With the `--source-root' flag, it will also
  register the original expression as a root.

* `nix-collect-garbage' now has a flag `--keep-successors' which
  causes successors not to be included in the list of garbage paths.

* `nix-collect-garbage' now has a flag `--invert' which will print all
  paths that should *not* be garbage collected.
2003-07-29 14:28:17 +00:00
Eelco Dolstra
dc14a3de46 * Nicer dot graphs. 2003-07-29 10:53:27 +00:00
Eelco Dolstra
79ba0431db * `fstateRefs' now works on derive expressions as well. TODO: make
this more efficient.
* A flag `-n' in 'nix --query' to normalise the argument.  Default is
  not to normalise.
2003-07-29 10:43:12 +00:00
Eelco Dolstra
5acb45446e * Let `nix --install' print out the id of the normal form.
* Some minor refactoring.
2003-07-29 09:45:03 +00:00
Eelco Dolstra
ce5fd1cc12 * Do not set LD_LIBRARY_PATH; it breaks many things. E.g., SuSE's ssh
dynamically links against libdb4 (?!), due to LD_LIBRARY_PATH it picks 
  up our libdb4 instead of SuSE's libdb4, but our libdb4 uses another 
  glibc so loading barfs.

  Instead, all packages should use rpaths to store library locations in
  executables/libraries.  The disadvantage is that overriding rpaths is 
  harder.  (It is possible by invoking the dynamic linker directly, e.g., 
  `/lib/ld-linux.so.2 --ignore-path LIST program args...' to ignore the 
  rpath for the libraries in LIST).  It would be better to use DT_RUNPATH, 
  which is consulted by the dynamic linker *after* LD_LIBRARY_PATH but 
  *before* ld.so.cache and the system directories.
2003-07-28 16:07:01 +00:00
Eelco Dolstra
dec8fbc52b * Check for the pthread library (db4 needs it on some platforms). 2003-07-28 14:13:42 +00:00
Eelco Dolstra
949c4fa1a8 * `nix --help'.
* `nix --query --graph' to print a dot dependency graph of derive
  expressions.
2003-07-28 12:19:23 +00:00
Eelco Dolstra
f21b341957 * Fix message. 2003-07-24 15:03:36 +00:00
Eelco Dolstra
5d7a20dac3 * Prevent spurious rebuilds of db/aterm. 2003-07-24 14:31:39 +00:00
Eelco Dolstra
0a0c1fcb4d * The `-v' flag no longer takes an argument; it should be repeated
instead (e.g., `-vvvv' for lots of output).  Default is to only
  print error messages.
2003-07-24 13:43:16 +00:00
Eelco Dolstra
3b521bb1bd * Do sync the database, since not doing so caused database changes not
to reach the disk at all.  Looks like a bug.
2003-07-24 13:35:17 +00:00
Eelco Dolstra
1a7468a57a * Debug levels. Use `--verbose / -v LEVEL' to display only messages
up to the given verbosity levels.  These currently are:

    lvlError = 0, 
    lvlNormal = 5,
    lvlDebug = 10,
    lvlDebugMore = 15

  although only lvlError and lvlDebug are actually used right now.
2003-07-24 08:53:43 +00:00
Eelco Dolstra
b75719b984 * Don't sync the database on close. This was killing performance.
(Of course, the real problem is that we open the database for
  *every* operation; we should only open it once.  And we should use
  transactions.)
2003-07-24 08:24:32 +00:00
Eelco Dolstra
39ce70025b * Incorporated Berkeley DB and ATerm into the source tree.
* `make dist'.
2003-07-23 15:53:34 +00:00
Eelco Dolstra
9202570f8c * libdb_cxx-4 -> libdb_cxx 2003-07-22 20:02:33 +00:00
Eelco Dolstra
e877c69d78 * Substitutes now should produce a path with the same id as they are
substituting for (obvious, really).

* For greater efficiency, nix-pull/unnar will place the output in a
  path that is probably the same as what is actually needed, thus
  preventing a path copy.

* Even if a output id is given in a Fix package expression, ensure
  that the resulting Nix derive expression has a different id.  This
  is because Nix expressions that are semantically equivalent (i.e.,
  build the same result) might be different w.r.t. efficiency or
  divergence.  It is absolutely vital for the substitute mechanism
  that such expressions are not used interchangeably.
2003-07-22 15:15:15 +00:00
Eelco Dolstra
df648c4967 * nix --query --expansion' (-qe') to get any path with content
corresponding to the given id.
2003-07-22 10:24:22 +00:00