Commit message (Collapse)AuthorAgeFilesLines
* desktop.eclass: Avoid file collisions in make_desktop_entry()Ulrich Müller2021-02-241-3/+10
| | | | | | | Closes: Reported-by: Sergey Torokhov <> Suggested-by: Ionen Wolkens <> Signed-off-by: Ulrich Müller <>
* eclass: [QA] Revert multiple meaningless doc changesMichał Górny2020-12-281-5/+0
| | | | | | | | | | | Revert multiple meaningless eclass documentation changes, notably adding a lot of placeholders and documenting implementation details. These changes were aimed at silencing (valid) documentation warnings without actually providing valuable documentation to the end users. While some of these changes were beneficial, it would take a lot of effort to review them all and the author is unwilling to fix his mistakes. Signed-off-by: Michał Górny <>
* eclass/desktop: fixup documentationAaron Bauman2020-12-161-0/+5
| | | | Signed-off-by: Aaron Bauman <>
* desktop.eclass: fix up @USAGE for make_desktop_entryBen Kohler2020-03-311-1/+1
| | | | Signed-off-by: Ben Kohler <>
* desktop.eclass: Sanitize filename of desktop entry.Ulrich Müller2020-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | | make_desktop_entry() extracts the first component of the filename from the Exec key in the desktop entry. This can however include arguments which will end up in the filename. For example, www-client/links has "Exec=links -g %u", resulting in links_-g_%u-links-2.desktop as the name of the file. The current extraction pattern originates from this CVS commit: with the commit message "scrub exec filename in case someone does something silly like pass the fullpath to a binary". Before that commit, anything after a space in Exec would have been removed. Restore that behaviour, and in addition use only the executable's basename. While at it, get rid of the sed call and handle everything in bash. Signed-off-by: Ulrich Müller <>
* desktop.eclass: Add missing ||die when writing to filesMichał Górny2018-08-091-3/+5
* desktop.eclass: domenu, remove unnecessary nested loopMichał Górny2018-08-091-5/+3
* desktop.eclass: domenu, fix potential overflow in exit statusMichał Górny2018-08-091-2/+2
| | | | | | | While increasing exit status for each failure may seem brilliant at first, it serves no purpose and has an overflow risk. For example, if domenu counted 256 failures, the exit status would be truncated to 0 (success).
* desktop.eclass: domenu, fix dying on non-existing filesMichał Górny2018-08-091-6/+4
| | | | | | | | | | | | | The weird logic in domenu had an explicit separate clause for unsuccessful return on non-existing files. This worked fine before EAPI 4 since '|| die' was mandatory. However, since 'doins' started dying on its own, developers have assumed the same for 'domenu' and stopped checking the exit status. As a result, missing files are now silently ignored. Change the logic to explicitly die when the file does not exist. To provide the best interoperability and avoid code duplication, just let 'doins' die on its own.
* desktop.eclass: Sanitize insoptsMichał Górny2018-06-131-0/+5
| | | | | Sanitize insopts when calling doins, in order to avoid prior insopts calls accidentally affecting do*/new* functions defined by the eclass.
* desktop.eclass: Split off desktop, menu, and icon functions from eutils.Ulrich Müller2017-11-301-0/+395
Split off functions make_desktop_entry, make_session_desktop, domenu, newmenu, doicon, and newicon from eutils.eclass into a dedicated desktop.eclass. These functions are independent of the rest of eutils, therefore moving them into their own eclass will help clarifying eclass inheritance in ebuilds. For backwards compatibility, eutils inherits the new eclass in existing EAPIs.