From 24737f279e6f1e0fd079609b9397deb867925324 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Oct 2006 14:01:45 +0000 Subject: [PATCH] * Backwards compatibility with old user environment manifests. --- src/libexpr/nixexpr-ast.def | 3 ++- src/nix-env/main.cc | 9 ++++++--- 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? */ }