[sagemath] 01/01: Apply ecm 7 patch from Arch Linux.
Tobias Hansen
thansen at moszumanska.debian.org
Wed Jul 27 18:41:38 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository sagemath.
commit 7a93b1f6c791c52994026611e98c4a0768621b41
Author: Tobias Hansen <thansen at debian.org>
Date: Wed Jul 27 18:21:15 2016 +0000
Apply ecm 7 patch from Arch Linux.
---
debian/patches/debian-ecm-7.patch | 81 +++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 82 insertions(+)
diff --git a/debian/patches/debian-ecm-7.patch b/debian/patches/debian-ecm-7.patch
new file mode 100644
index 0000000..6eaf175
--- /dev/null
+++ b/debian/patches/debian-ecm-7.patch
@@ -0,0 +1,81 @@
+Description: Necessary changes to work with ecm 7.
+Origin: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/sagemath
+
+--- a/sage/src/sage/interfaces/ecm.py
++++ b/sage/src/sage/interfaces/ecm.py
+@@ -140,9 +140,6 @@
+ - ``ve`` -- integer `n`. Verbosely show short (`< n`
+ character) expressions on each loop
+
+- - ``cofdec`` -- boolean. Force cofactor output in decimal
+- (even if expressions are used )
+-
+ - ``B2scale`` -- integer. Multiplies the default B2 value
+
+ - ``go`` -- integer. Preload with group order val, which can
+@@ -395,15 +392,15 @@
+ if m is not None:
+ factor = m.group('factor')
+ primality = m.group('primality')
+- assert primality in ['probable prime', 'composite']
+- result += [(ZZ(factor), primality == 'probable prime')]
++ assert primality in ['prime', 'composite']
++ result += [(ZZ(factor), primality == 'prime')]
+ continue # cofactor on the next line
+ m = self._found_cofactor_re.match(line)
+ if m is not None:
+ cofactor = m.group('cofactor')
+ primality = m.group('primality')
+- assert primality in ['Probable prime', 'Composite']
+- result += [(ZZ(cofactor), primality == 'Probable prime')]
++ assert primality in ['Prime', 'Composite']
++ result += [(ZZ(cofactor), primality == 'Prime')]
+ # assert len(result) == 2
+ return result
+ raise ValueError('failed to parse ECM output')
+@@ -500,7 +497,6 @@
+ if factor_digits is not None:
+ B1 = self.recommended_B1(factor_digits)
+ kwds['one'] = True
+- kwds['cofdec'] = True
+ cmd = self._make_cmd(B1, None, kwds)
+ out = self._run_ecm(cmd, n)
+ return self._parse_output(n, out)
+@@ -832,8 +828,8 @@
+ Step 1 took 12ms
+ Step 2 took 17ms
+ ********** Factor found in step 2: 79792266297612017
+-Found probable prime factor of 17 digits: 79792266297612017
+-Probable prime cofactor 6366805760909027985741435139224233 has 34 digits
++Found prime factor of 17 digits: 79792266297612017
++Prime cofactor 6366805760909027985741435139224233 has 34 digits
+ """
+
+ TEST_ECM_OUTPUT_2 = """
+@@ -843,8 +839,8 @@
+ Step 1 took 2ms
+ Step 2 took 3ms
+ ********** Factor found in step 2: 179424673
+-Found probable prime factor of 9 digits: 179424673
+-Probable prime cofactor 179424673 has 9 digits
++Found prime factor of 9 digits: 179424673
++Prime cofactor 179424673 has 9 digits
+ """
+
+ TEST_ECM_OUTPUT_3 = """
+@@ -862,7 +858,7 @@
+ Step 1 took 5ms
+ Step 2 took 4ms
+ ********** Factor found in step 2: 197002597249
+-Found probable prime factor of 12 digits: 197002597249
++Found prime factor of 12 digits: 197002597249
+ Composite cofactor 339872432034468861533158743041639097889948066859 has 48 digits
+ """
+
+@@ -874,5 +870,5 @@
+ Step 2 took 2ms
+ ********** Factor found in step 2: 265748496095531068869578877937
+ Found composite factor of 30 digits: 265748496095531068869578877937
+-Probable prime cofactor 251951573867253012259144010843 has 30 digits
++Prime cofactor 251951573867253012259144010843 has 30 digits
+ """
diff --git a/debian/patches/series b/debian/patches/series
index 0778d4f..729f06e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -28,3 +28,4 @@ debian-temp-userdir-singular.patch
debian-temp-userdir.patch
temp-disable-parallel-sphinx.patch
debian-python-2.7.11.patch
+debian-ecm-7.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list