Improve usability of checkSpecificationMountPoint()'s error messages
@@ -375,10 +375,15 @@ static kdb_boolean_t checkSpecificationMountPoint (KeySet * const mountPointsKs,
if (mountPointKey == NULL)
{
char * description = elektraFormat (
- "The specification for application '%s' was not properly mounted. This is likely caused by an incomplete "
- "installation of the application. Please consult the application's documentation or contact its developers. "
- "Technical detail: The mountPointKey '%s' should exist, but it does not.",
- application, keyName (mountPointLookupKey));
+ "The specification for application \"%s\" was not properly mounted. \nTo fix this, execute:\n"
+ "\"$ sudo kdb umount %s\"\n"
+ "\"$ sudo kdb umount spec:%s\"\n"
+ "and then reinstall the application.\n"
+ "If that does not help, please consult the application's documentation or contact its developers.\n"
+ "Details: \n"
+ "The mountPointKey \"%s\" should exist, but it does not.\n"
+ "This was likely caused by an incomplete installation of the application.\n",
+ application, application, application, keyName (mountPointLookupKey));
keyDel (mountPointLookupKey);
*error = elektraErrorCreate (ELEKTRA_ERROR_INSTALLATION, description, "elektra", "unknown", 0);
elektraFree (description);
@@ -388,10 +393,15 @@ static kdb_boolean_t checkSpecificationMountPoint (KeySet * const mountPointsKs,
else if (elektraStrCmp (keyString (mountPointKey), mountPoint) != 0)
{
char * description = elektraFormat (
- "The specification for application %s was not properly mounted. This is likely caused by an incomplete "
- "installation of the application. Please consult the application's documentation or contact its developers. "
- "Technical detail: The value of mountPointKey '%s' should match the application name '%s', but it does not.",
- application, keyName (mountPointLookupKey), application);
+ "The specification for application \"%s\" was not properly mounted. \nTo fix this, execute:\n"
+ "\"$ sudo kdb umount %s\"\n"
+ "\"$ sudo kdb umount spec:%s\"\n"
+ "and then reinstall the application.\n"
+ "If that does not help, please consult the application's documentation or contact its developers.\n"
+ "Details: \n"
+ "The value of key %s should be \"%s\" but it is \"%s\".\n"
+ "This was likely caused by an incomplete installation of the application.\n",
+ application, application, application, keyName (mountPointKey), mountPoint, keyString(mountPointKey));
*error = elektraErrorCreate (ELEKTRA_ERROR_INSTALLATION, description, "elektra", "unknown", 0);
keyDel (mountPointLookupKey);
keyDel (mountPointKey);
