Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 687927 Details for
Bug 771708
desktop.eclass: make_desktop_entry .desktop naming overlaps for a same command with different arguments
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for desktop.eclass v2
0001-desktop.eclass-Avoid-file-collisions-in-make_desktop.patch (text/plain), 1.61 KB, created by
Ulrich Müller
on 2021-02-21 15:07:15 UTC
(
hide
)
Description:
Patch for desktop.eclass v2
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2021-02-21 15:07:15 UTC
Size:
1.61 KB
patch
obsolete
>From 5f637eaf5132cc9f5cb10360bda520c0022fe724 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org> >Date: Sun, 21 Feb 2021 15:13:21 +0100 >Subject: [PATCH] desktop.eclass: Avoid file collisions in make_desktop_entry() >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Closes: https://bugs.gentoo.org/771708 >Reported-by: Sergey Torokhov <torokhov-s-a@yandex.ru> >Suggested-by: Ionen Wolkens <sudinave@gmail.com> >Signed-off-by: Ulrich Müller <ulm@gentoo.org> >--- > eclass/desktop.eclass | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/eclass/desktop.eclass b/eclass/desktop.eclass >index 7d5c0f0f9a26..82e764e2a1a4 100644 >--- a/eclass/desktop.eclass >+++ b/eclass/desktop.eclass >@@ -1,4 +1,4 @@ >-# Copyright 1999-2020 Gentoo Authors >+# Copyright 1999-2021 Gentoo Authors > # Distributed under the terms of the GNU General Public License v2 > > # @ECLASS: desktop.eclass >@@ -162,8 +162,15 @@ make_desktop_entry() { > else > local desktop_name="${PN}-${slot}" > fi >- local desktop="${exec%%[[:space:]]*}" >- desktop="${T}/${desktop##*/}-${desktop_name}.desktop" >+ local desktop_exec="${exec%%[[:space:]]*}" >+ desktop_exec="${desktop_exec##*/}" >+ >+ # Prevent collisions if a file with the same name already exists #771708 >+ local desktop="${desktop_exec}-${desktop_name}" count=0 >+ while [[ -e ${ED}/usr/share/applications/${desktop}.desktop ]]; do >+ desktop="${desktop_exec}-$((++count))-${desktop_name}" >+ done >+ desktop="${T}/${desktop}.desktop" > > # Don't append another ";" when a valid category value is provided. > type=${type%;}${type:+;} >-- >2.30.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 771708
:
687915
| 687927 |
814063