diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-27 11:09:07 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-27 11:09:07 -0400 |
commit | e94806d03098f1d6e654542500bbea1eaa0ec60b (patch) | |
tree | 4e967f3d39a984d86bb93849d76cab92512a07ce /src/nix-instantiate | |
parent | 9c2decaa1935ae4bf99a9b723d4eab188f8f88ef (diff) | |
parent | a9e6752bbd888ab8fbc1cda6e4d539b2858c4cef (diff) | |
download | guix-e94806d03098f1d6e654542500bbea1eaa0ec60b.tar.gz |
Merge branch 'master' into no-manifests
Diffstat (limited to 'src/nix-instantiate')
-rw-r--r-- | src/nix-instantiate/nix-instantiate.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index 270b4ddc2e..beb7fa0249 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -64,9 +64,11 @@ void processExpr(EvalState & state, const Strings & attrPaths, Path drvPath = i->queryDrvPath(state); if (gcRoot == "") printGCWarning(); - else - drvPath = addPermRoot(*store, drvPath, - makeRootName(gcRoot, rootNr), indirectRoot); + else { + Path rootName = gcRoot; + if (++rootNr > 1) rootName += "-" + int2String(rootNr); + drvPath = addPermRoot(*store, drvPath, rootName, indirectRoot); + } std::cout << format("%1%\n") % drvPath; } } |