[neon/qt/pyside2/Neon/release] debian: Backport changes to pass --reuse-build only to commands that support it.

Dmitry Shachnev null at kde.org
Wed Oct 19 14:56:29 BST 2022


Git commit 6ec3ac084c6be286ed492e4e8ac0e8ea1e558070 by Dmitry Shachnev.
Committed on 16/12/2020 at 17:29.
Pushed by jriddell into branch 'Neon/release'.

Backport changes to pass --reuse-build only to commands that support it.

M  +2    -0    debian/changelog
A  +30   -0    debian/patches/fix-reuse-build.patch
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt/pyside2/commit/6ec3ac084c6be286ed492e4e8ac0e8ea1e558070

diff --git a/debian/changelog b/debian/changelog
index e8a1399a..a3180653 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ pyside2 (5.15.2-1) UNRELEASED; urgency=medium
   * New upstream release.
   * Drop python3.9.patch, included in the new release.
   * Rebase other patches.
+  * Backport upstream changes to pass --reuse-build only to commands that
+    support it.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Wed, 16 Dec 2020 20:21:03 +0300
 
diff --git a/debian/patches/fix-reuse-build.patch b/debian/patches/fix-reuse-build.patch
new file mode 100644
index 00000000..b06902a7
--- /dev/null
+++ b/debian/patches/fix-reuse-build.patch
@@ -0,0 +1,30 @@
+From: Dmitry Shachnev <mitya57 at debian.org>
+Date: Wed, 16 Dec 2020 20:26:18 +0300
+Subject: Pass --reuse-build only to commands that use DistUtilsCommandMixin
+
+This is a concatenation of two upstream commits:
+- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=ed0571df854a232e
+- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=3f00c2adad2e38b0
+---
+ build_scripts/setup_runner.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/build_scripts/setup_runner.py b/build_scripts/setup_runner.py
+index 57c8fbd..3c7116b 100644
+--- a/build_scripts/setup_runner.py
++++ b/build_scripts/setup_runner.py
+@@ -88,8 +88,13 @@ class SetupRunner(object):
+         internal_build_type_arg = self.construct_internal_build_type_cmd_line_argument(build_type)
+         setup_cmd = [sys.executable] + self.sub_argv + [internal_build_type_arg]
+ 
++        command = self.sub_argv[0]
++        if command == 'setup.py' and len(self.sub_argv) > 1:
++            command = self.sub_argv[1]
++
+         # Add --reuse-build option if requested and not already present.
+-        if reuse_build and not self.cmd_line_argument_is_in_args("reuse-build", self.sub_argv):
++        if (reuse_build and command in ('bdist_wheel', 'build', 'build_rst_docs', 'install')
++            and not self.cmd_line_argument_is_in_args("reuse-build", self.sub_argv)):
+             setup_cmd.append(self.construct_cmd_line_argument("reuse-build"))
+         self.invocations_list.append(setup_cmd)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 05279f98..5dc4fac5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 fix-spelling-errors.patch
 update-patchelf.patch
 blacklist-failing-tests.patch
+fix-reuse-build.patch



More information about the Neon-commits mailing list