Bug 486866

Summary: Rebuild of breeze-icons fails
Product: [Plasma] Breeze Reporter: Jonathan L Hanmann <jhanmann>
Component: IconsAssignee: visual-design
Status: REPORTED ---    
Severity: normal CC: kainz.a, m
Priority: NOR    
Version First Reported In: master   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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]))