Merge pull request #1571 from teto/improve_priority_msg
Improve error message for conflicting priorities
This commit is contained in:
commit
97307811ee
|
@ -74,10 +74,11 @@ static void createLinks(const Path & srcDir, const Path & dstDir, int priority)
|
||||||
auto prevPriority = priorities[dstFile];
|
auto prevPriority = priorities[dstFile];
|
||||||
if (prevPriority == priority)
|
if (prevPriority == priority)
|
||||||
throw Error(format(
|
throw Error(format(
|
||||||
"collision between '%1%' and '%2%'; "
|
"Packages '%1%' and '%2%' have the same priority '%3%'"
|
||||||
"use 'nix-env --set-flag priority NUMBER PKGNAME' "
|
"use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' "
|
||||||
"to change the priority of one of the conflicting packages"
|
"to change the priority of one of the conflicting packages"
|
||||||
) % srcFile % target);
|
" ('0' being the highest priority)"
|
||||||
|
) % srcFile % target % priority);
|
||||||
if (prevPriority < priority)
|
if (prevPriority < priority)
|
||||||
continue;
|
continue;
|
||||||
if (unlink(dstFile.c_str()) == -1)
|
if (unlink(dstFile.c_str()) == -1)
|
||||||
|
|
Loading…
Reference in a new issue