Title: [293651] trunk/Tools
Revision
293651
Author
[email protected]
Date
2022-05-01 01:51:05 -0700 (Sun, 01 May 2022)

Log Message

[WPE][GTK] Built product archives include old library files
https://bugs.webkit.org/show_bug.cgi?id=239928

Patch by Philippe Normand <[email protected]> on 2022-05-01
Reviewed by Adrian Perez de Castro.

* CISupport/built-product-archive: Exclude old WPE/GTK files from built product zip archives.

Canonical link: https://commits.webkit.org/250155@main

Modified Paths

Diff

Modified: trunk/Tools/CISupport/built-product-archive (293650 => 293651)


--- trunk/Tools/CISupport/built-product-archive	2022-05-01 02:42:59 UTC (rev 293650)
+++ trunk/Tools/CISupport/built-product-archive	2022-05-01 08:51:05 UTC (rev 293651)
@@ -241,8 +241,33 @@
         # On GTK+/WPE/JSC we don't need the intermediate step of creating a thinDirectory
         # to be compressed in a ZIP file, because we can create the ZIP directly.
         # This is faster and requires less disk resources.
-        contents = ['bin', 'lib']
+        contents = ['bin',]
 
+        # Don't pack files named with following prefixes, unless they are resolved from a symbolic
+        # link. This helps reducing the zip file size in situations where the build directory
+        # contains old library files.
+        ignoreList = ('libwebkit2gtk-', 'libjavascriptcoregtk', 'libWPEWebKit')
+        absoluteLibDirectory = os.path.join(_configurationBuildDirectory, 'lib')
+        for filename in os.listdir(absoluteLibDirectory):
+            path = os.path.join(absoluteLibDirectory, filename)
+            relativePath = os.path.join('lib', filename)
+            if os.path.isdir(path):
+                contents.append(relativePath)
+                continue
+            if os.path.islink(path):
+                contents.append(relativePath)
+                realAbsolutePath = os.path.realpath(path)
+                realRelativePath = realAbsolutePath[len(_configurationBuildDirectory)+1:]
+                contents.append(realRelativePath)
+                continue
+            ignore = False
+            for prefix in ignoreList:
+                if filename.startswith(prefix):
+                    ignore = True
+                    break
+            if not ignore:
+                contents.append(relativePath)
+
         # For WPE pack the Cog browser as well if it's present.
         cogDirectory = os.path.join('Tools', 'cog-prefix', 'src', 'cog-build')
         absoluteCogDirectory = os.path.join(_configurationBuildDirectory, cogDirectory)

Modified: trunk/Tools/ChangeLog (293650 => 293651)


--- trunk/Tools/ChangeLog	2022-05-01 02:42:59 UTC (rev 293650)
+++ trunk/Tools/ChangeLog	2022-05-01 08:51:05 UTC (rev 293651)
@@ -1,3 +1,12 @@
+2022-04-30  Philippe Normand  <[email protected]>
+
+        [WPE][GTK] Built product archives include old library files
+        https://bugs.webkit.org/show_bug.cgi?id=239928
+
+        Reviewed by Adrian Perez de Castro.
+
+        * CISupport/built-product-archive: Exclude old WPE/GTK files from built product zip archives.
+
 2022-04-29  Chris Dumez  <[email protected]>
 
         Unreviewed, reverting r293621.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to