[jpy] 01/09: Adapt patch to detect more archs correctly

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Oct 28 11:20:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to tag debian/0.8-6
in repository jpy.

commit 11d3cc519ec7589020b2eb4c3de558cd2fa88674
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Jul 7 09:41:19 2016 +0100

    Adapt patch to detect more archs correctly
---
 debian/changelog                 |  8 +++++++-
 debian/patches/default_jvm.patch |  6 +++---
 debian/patches/python3.patch     | 22 ++++++++--------------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0e83420..ba1f362 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,15 @@
+jpy (0.8-4) unstable; urgency=medium
+
+  * Adapt patch to detect more archs correctly
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Thu, 07 Jul 2016 09:15:00 +0100
+
 jpy (0.8-3) unstable; urgency=medium
 
   * Remove hard-coded amd64/i386 arch for JVM search.
     Use `dpkg --print-architecture`
 
- -- Alastair McKinstry <mckinstry at debian.org>  Wed, 06 Jul 2016 10:40:14 +0100
+ -- Alastair McKinstry <mckinstry at debian.org>  Thu, 07 Jul 2016 09:14:41 +0100
 
 jpy (0.8-2) unstable; urgency=medium
 
diff --git a/debian/patches/default_jvm.patch b/debian/patches/default_jvm.patch
index 2fe283c..38f93bc 100644
--- a/debian/patches/default_jvm.patch
+++ b/debian/patches/default_jvm.patch
@@ -21,7 +21,7 @@ Index: jpy-0.8/jpyutil.py
  def _get_jvm_lib_dirs(java_home_dir):
 -    arch = 'amd64' if PYTHON_64BIT else 'i386'
 +    # arch = 'amd64' if PYTHON_64BIT else 'i386'
-+    arch = subprocess.check_output(['dpkg', '--print-architecture']).strip()
++    arch = subprocess.check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip()
      return (os.path.join(java_home_dir, 'bin'),
              os.path.join(java_home_dir, 'bin', 'server'),
              os.path.join(java_home_dir, 'bin', 'client'),
@@ -29,8 +29,8 @@ Index: jpy-0.8/jpyutil.py
          search_dirs += _get_jvm_lib_dirs(jre_home_dir)
      search_dirs += _get_jvm_lib_dirs(java_home_dir)
  
-+    dpkg_arch = subprocess.check_output(['dpkg', '--print-architecture']).strip()
-+    search_dirs += "/usr/lib/jvm/default-java/jre/lib/%s/server" % dpkg_arch
++    arch = subprocess.check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip()
++    search_dirs += "/usr/lib/jvm/default-java/jre/lib/%s/server" % arch
 +
      search_dirs = _add_paths_if_exists([], *search_dirs)
  
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
index 416a94e..a7e38e7 100644
--- a/debian/patches/python3.patch
+++ b/debian/patches/python3.patch
@@ -16,29 +16,23 @@ Index: jpy-0.8/jpyutil.py
  
  # Uncomment for debugging
  # logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
-@@ -158,7 +158,9 @@ def find_jvm_dll_file(java_home_dir=None
- 
+@@ -159,6 +159,7 @@ def find_jvm_dll_file(java_home_dir=None
  def _get_jvm_lib_dirs(java_home_dir):
      # arch = 'amd64' if PYTHON_64BIT else 'i386'
--    arch = subprocess.check_output(['dpkg', '--print-architecture']).strip()
-+    arch = check_output(['dpkg', '--print-architecture']).strip()
-+    if type(arch) != str:
-+        arch = arch.decode('utf-8')
+     arch = subprocess.check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip()
++    arch = arch.decode('utf-8') if type(arch) != str
      return (os.path.join(java_home_dir, 'bin'),
              os.path.join(java_home_dir, 'bin', 'server'),
              os.path.join(java_home_dir, 'bin', 'client'),
-@@ -195,7 +197,9 @@ def _find_jvm_dll_file(java_home_dir):
-         search_dirs += _get_jvm_lib_dirs(jre_home_dir)
+@@ -196,6 +197,7 @@ def _find_jvm_dll_file(java_home_dir):
      search_dirs += _get_jvm_lib_dirs(java_home_dir)
  
--    dpkg_arch = subprocess.check_output(['dpkg', '--print-architecture']).strip()
-+    dpkg_arch = check_output(['dpkg', '--print-architecture']).strip()
-+    if type(dpkg_arch) != str: # Python3
-+        dpkg_arch = dpkg_arch.decode('utf-8')
-     search_dirs += "/usr/lib/jvm/default-java/jre/lib/%s/server" % dpkg_arch
+     arch = subprocess.check_output(['dpkg-architecture','-q', 'DEB_BUILD_ARCH_CPU']).strip()
++    arch = arch.decode('utf-8') if type(arch) != str
+     search_dirs += "/usr/lib/jvm/default-java/jre/lib/%s/server" % arch
  
      search_dirs = _add_paths_if_exists([], *search_dirs)
-@@ -436,7 +440,7 @@ class Config:
+@@ -436,7 +438,7 @@ class Config:
  class Properties:
      def __init__(self, values=None):
          if values:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/jpy.git



More information about the debian-science-commits mailing list