[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [craft-blueprints-kde] libs/qt5/qtbase: Revert "Try it without a qt.conf"
From:       Hannah von Reth <null () kde ! org>
Date:       2018-09-28 9:30:56
Message-ID: E1g5p6u-0004Xk-By () code ! kde ! org
[Download RAW message or body]

Git commit 36bcd0d155abae57f026d53ef6ce589c8a829559 by Hannah von Reth.
Committed on 28/09/2018 at 09:30.
Pushed by vonreth into branch 'master'.

Revert "Try it without a qt.conf"

This reverts commit 3dc461f4f23ca3688629f555fdff8f529d4a12ed.

M  +14   -2    libs/qt5/qtbase/qtbase.py

https://commits.kde.org/craft-blueprints-kde/36bcd0d155abae57f026d53ef6ce589c8a829559

diff --git a/libs/qt5/qtbase/qtbase.py b/libs/qt5/qtbase/qtbase.py
index ea1c15f..e02d949 100644
--- a/libs/qt5/qtbase/qtbase.py
+++ b/libs/qt5/qtbase/qtbase.py
@@ -204,6 +204,11 @@ class QtPackage(Qt5CorePackageBase):
         with self.getQtBaseEnv():
             if not Qt5CorePackageBase.install(self):
                 return False
+            parser = configparser.ConfigParser()
+            parser.read(os.path.join(self.buildDir(), "bin", "qt.conf"))
+            parser.remove_section("EffectiveSourcePaths")
+            with open(os.path.join(self.imageDir(), "bin", "qt.conf"), "wt") as out:
+                parser.write(out)
 
             # install msvc debug files if available
             if CraftCore.compiler.isMSVC():
@@ -222,13 +227,20 @@ class QtPackage(Qt5CorePackageBase):
         # TODO: remove after the next cache rebuild (now 5.11.2)
         conf = os.path.join(self.imageDir(), "bin", "qt.conf")
         if os.path.exists(conf):
-            utils.deleteFile(conf)
+            parser = configparser.ConfigParser()
+            parser.read(conf)
+            parser.remove_section("EffectiveSourcePaths")
+            with open(conf, "wt") as out:
+                parser.write(out)
 
         if CraftCore.compiler.isWindows and CraftCore.settings.getboolean("Packager", "UseCache"):
             return utils.system(["qtbinpatcher", "--nobackup",
                                  f"--qt-dir={self.installDir()}",
                                  f"--new-dir={CraftStandardDirs.craftRoot()}"])
-        return True
+        else:
+            return self.patchInstallPrefix([os.path.join(self.installDir(), "bin", "qt.conf")],
+                                           self.subinfo.buildPrefix,
+                                           CraftCore.standardDirs.craftRoot())
 
     def getQtBaseEnv(self):
         envs = {}
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic