l...@gnu.org (Ludovic Courtès) writes: > [...] > >> I/O error : Permission denied >> I/O error : Permission denied >> Failed to write XML file; For permission problems, try rerunning as root > > I found that string comes from ‘shared-mime-info’, which is itself used > by the ‘xdg-mime-database’ hook in (guix profiles) (a hook that runs > when the profile is created to update the MIME database): > > static gboolean save_xml_file(xmlDocPtr doc, const gchar *filename, GError > **error) > { > #if LIBXML_VERSION > 20400 > if (xmlSaveFormatFileEnc(filename, doc, "utf-8", 1) < 0) > { > g_set_error(error, G_FILE_ERROR, G_FILE_ERROR_FAILED, > "Failed to write XML file; For permission problems, > try rerunning as root"); > return FALSE; > } > #else > > 宋文武: any idea what the problem might be? Perhaps > ‘update-mime-database’ is trying to write to /gnu/store/…-something? Yep, it happends when '$out/share/mime/application' is not writable. The xml files under 'application' are going to be generated by update-mime-database, and the shared-mime-info package has it pre-generated, so after union "share/mime", an un-writable 'application' directory point to the store will cause the problem.
Commit 359f06aa fix this by union the "share/mime/packages" directory. > > Also, it’s a problem that ‘update-mime-database’ returns 0 here, as > seems to be the case. It returns 256 here for the problem, but the derivation still built and profile got updated, I have no idea about this :- Does a failing hook (returns #f) supposed to top the profile update?