aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-10-17 14:01:45 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-10-17 14:01:45 +0000
commit24737f279e6f1e0fd079609b9397deb867925324 (patch)
treeb2c8b9938227aebd9ebd31b6016f9304443bbb3c /src
parent4bd5cdb90b980bd5e0eec86bf3fcfdd3b07946d1 (diff)
* Backwards compatibility with old user environment manifests.
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/nixexpr-ast.def3
-rw-r--r--src/nix-env/main.cc9
2 files changed, 8 insertions, 4 deletions
diff --git a/src/libexpr/nixexpr-ast.def b/src/libexpr/nixexpr-ast.def
index fe5fe71b0..c7029e927 100644
--- a/src/libexpr/nixexpr-ast.def
+++ b/src/libexpr/nixexpr-ast.def
@@ -44,6 +44,7 @@ Int | int | Expr |
#
# For canonicity, the store paths should be in sorted order.
Str | string ATermList | Expr |
+Str | string | Expr | ObsoleteStr
# A path is a reference to a file system object that is to be copied
# to the Nix store when used as a derivation attribute. When it is
@@ -67,7 +68,7 @@ Bool | ATerm | Expr |
Null | | Expr |
Bind | string Expr Pos | ATerm |
-Bind | string Expr | ATerm | Bind2
+Bind | string Expr | ATerm | ObsoleteBind
Inherit | Expr ATermList Pos | ATerm |
Scope | | Expr |
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index f67a07689..f2a995730 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -107,10 +107,11 @@ struct AddPos : TermFun
{
ATerm operator () (ATerm e)
{
- ATerm x, y, z;
- if (matchBind(e, x, y, z)) return e;
- if (matchBind2(e, x, y))
+ ATerm x, y;
+ if (matchObsoleteBind(e, x, y))
return makeBind(x, y, makeNoPos());
+ if (matchObsoleteStr(e, x))
+ return makeStr(x, ATempty);
return e;
}
};
@@ -921,6 +922,8 @@ static void opQuery(Globals & globals,
else
table.push_back(columns);
+ cout.flush();
+
} catch (AssertionError & e) {
/* !!! hm, maybe we should give some sort of warning here? */
}