Skip to content
Snippets Groups Projects
Commit 97307811 authored by Eelco Dolstra's avatar Eelco Dolstra Committed by GitHub
Browse files

Merge pull request #1571 from teto/improve_priority_msg

Improve error message for conflicting priorities
parents 73252aef 6920c237
No related branches found
No related tags found
No related merge requests found
......@@ -74,10 +74,11 @@ static void createLinks(const Path & srcDir, const Path & dstDir, int priority)
auto prevPriority = priorities[dstFile];
if (prevPriority == priority)
throw Error(format(
"collision between '%1%' and '%2%'; "
"use 'nix-env --set-flag priority NUMBER PKGNAME' "
"Packages '%1%' and '%2%' have the same priority '%3%'"
"use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' "
"to change the priority of one of the conflicting packages"
) % srcFile % target);
" ('0' being the highest priority)"
) % srcFile % target % priority);
if (prevPriority < priority)
continue;
if (unlink(dstFile.c_str()) == -1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment