Bug 486866 - Rebuild of breeze-icons fails
Summary: Rebuild of breeze-icons fails
Status: REPORTED
Alias: None
Product: Breeze
Classification: Plasma
Component: Icons (other bugs)
Version First Reported In: master
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: visual-design
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-10 18:21 UTC by Jonathan L Hanmann
Modified: 2024-05-10 18:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan L Hanmann 2024-05-10 18:21:16 UTC
A rebuild fails with apps path already existing. This may require make-install-prefix set to sudo although I haven't gone back and verified this as a prerequisite. The following patch (which may be an improper solution) works around the failure at least:

diff --git a/create-app-symlinks.py b/create-app-symlinks.py
index a31777bf..42c5f37b 100644
--- a/create-app-symlinks.py
+++ b/create-app-symlinks.py
@@ -148,7 +148,8 @@ created_symlinks = dict()
 
 for dirpath, _, filenames in os.walk(os.path.join(SRCDIR, "apps")):
     outpath = os.path.join(BINDIR + dirpath[len(SRCDIR):])
-    os.makedirs(outpath)
+    if os.path.exists(outpath) == False:
+        os.makedirs(outpath)
     for file in filenames:
         if file[-4:] == ".svg":
             base = file[:-4]
@@ -156,7 +157,8 @@ for dirpath, _, filenames in os.walk(os.path.join(SRCDIR, "apps")):
                 created_symlinks[base] = dict()
             if base in aliases:
                 for alias in aliases[base]:
-                    os.symlink(file, os.path.join(outpath, alias + ".svg"))
+                    if os.path.lexists(os.path.join(outpath, alias + ".svg")) == False:
+                        os.symlink(file, os.path.join(outpath, alias + ".svg"))
                     if alias not in created_symlinks[base].keys():
                         created_symlinks[base][alias] = []
                     created_symlinks[base][alias].append(int(outpath.split('/')[-1]))