about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/manual/opt-common-syn.xml5
-rw-r--r--doc/manual/opt-common.xml12
-rw-r--r--doc/manual/package-management.xml15
-rw-r--r--src/libstore/optimise-store.cc5
4 files changed, 20 insertions, 17 deletions
diff --git a/doc/manual/opt-common-syn.xml b/doc/manual/opt-common-syn.xml
index 6628fde93516..d65f4009ee6e 100644
--- a/doc/manual/opt-common-syn.xml
+++ b/doc/manual/opt-common-syn.xml
@@ -37,6 +37,11 @@
   <option>-I</option>
   <replaceable>path</replaceable>
 </arg>
+<arg>
+  <option>--option</option>
+  <replaceable>name</replaceable>
+  <replaceable>value</replaceable>
+</arg>
 <sbr />
 
 </nop>
diff --git a/doc/manual/opt-common.xml b/doc/manual/opt-common.xml
index b9df23dcfbe9..0b57517670be 100644
--- a/doc/manual/opt-common.xml
+++ b/doc/manual/opt-common.xml
@@ -337,7 +337,7 @@
   
   <listitem><para>Causes Nix to print out a stack trace in case of Nix
   expression evaluation errors.</para></listitem>
-  
+
 </varlistentry>
 
 
@@ -351,6 +351,16 @@
 </varlistentry>
 
 
+<varlistentry><term><option>--option</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
+  
+  <listitem><para>Set the Nix configuration option
+  <replaceable>name</replaceable> to <replaceable>value</replaceable>.
+  This overrides settings in the Nix configuration file (see
+  <citerefentry><refentrytitle>nix.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para></listitem>
+  
+</varlistentry>
+
+
 </variablelist>
 
 
diff --git a/doc/manual/package-management.xml b/doc/manual/package-management.xml
index 8cc6aa857edd..314218daf346 100644
--- a/doc/manual/package-management.xml
+++ b/doc/manual/package-management.xml
@@ -175,21 +175,6 @@ upgrading `coreutils-5.0' to `coreutils-5.2.1'</screen>
 
 </para>
 
-<para>If you grow bored of specifying the Nix expressions using
-<parameter>-f</parameter> all the time, you can set a default
-location:
-
-<screen>
-$ nix-env -I nixpkgs-<replaceable>version</replaceable></screen>
-
-After this you can just say, for instance, <literal>nix-env -u
-'*'</literal>.<footnote><para>Setting a default using
-<parameter>-I</parameter> currently clashes with using Nix channels,
-since <literal>nix-channel --update</literal> calls <literal>nix-env
--I</literal> to set the default to the Nix expressions it downloaded
-from the channel, replacing whatever default you had
-set.</para></footnote></para>
-
 </section>
 
 
diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc
index e08ee1784510..334f4f355f43 100644
--- a/src/libstore/optimise-store.cc
+++ b/src/libstore/optimise-store.cc
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "util.hh"
 #include "local-store.hh"
 #include "immutable.hh"
@@ -51,6 +53,8 @@ struct MakeImmutable
 
 void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path)
 {
+    checkInterrupt();
+    
     struct stat st;
     if (lstat(path.c_str(), &st))
         throw SysError(format("getting attributes of path `%1%'") % path);
@@ -65,7 +69,6 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path)
     /* We can hard link regular files and maybe symlinks. */
     if (!S_ISREG(st.st_mode)
 #if CAN_LINK_SYMLINK
-        x
         && !S_ISLNK(st.st_mode)
 #endif
         ) return;