From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/gap/files/, sci-mathematics/gap/
Date: Sun, 24 Nov 2024 14:36:05 +0000 (UTC) [thread overview]
Message-ID: <1732458836.aa676b404b96cc55e5596728261f37794591dc72.mjo@gentoo> (raw)
commit: aa676b404b96cc55e5596728261f37794591dc72
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 24 14:23:12 2024 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Nov 24 14:33:56 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa676b40
sci-mathematics/gap: backport another upstream patch
In particular, this fixes bug 944744, a test failure with the new
dev-gap/grape.
Closes: https://bugs.gentoo.org/944744
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
.../gap/files/gap-4.13.1-more-hash-fixes.patch | 50 ++++++++++++++++++++++
.../{gap-4.13.1-r1.ebuild => gap-4.13.1-r2.ebuild} | 5 ++-
2 files changed, 54 insertions(+), 1 deletion(-)
diff --git a/sci-mathematics/gap/files/gap-4.13.1-more-hash-fixes.patch b/sci-mathematics/gap/files/gap-4.13.1-more-hash-fixes.patch
new file mode 100644
index 000000000000..5a464a0fda49
--- /dev/null
+++ b/sci-mathematics/gap/files/gap-4.13.1-more-hash-fixes.patch
@@ -0,0 +1,50 @@
+From 19484a75098d43e75e3facfdd05dccefc358e43f Mon Sep 17 00:00:00 2001
+From: Max Horn <max@quendi.de>
+Date: Fri, 11 Oct 2024 14:54:29 +0200
+Subject: [PATCH] Fix hashing for integer plists (#5807)
+
+---
+ lib/dicthf.gi | 2 +-
+ tst/testbugfix/2024-10-11-orbit-hash.tst | 20 ++++++++++++++++++++
+ 2 files changed, 21 insertions(+), 1 deletion(-)
+ create mode 100644 tst/testbugfix/2024-10-11-orbit-hash.tst
+
+diff --git a/lib/dicthf.gi b/lib/dicthf.gi
+index e4349ac940..119d5329f6 100644
+--- a/lib/dicthf.gi
++++ b/lib/dicthf.gi
+@@ -164,7 +164,7 @@ function(m, v)
+ if not IsPlistRep(x) then
+ x := AsPlist(x);
+ fi;
+- return HashKeyWholeBag(x, 1);
++ return HashKeyBag(x, 1, 0, Length(x) * GAPInfo.BytesPerVariable);
+ end;
+
+ # alternative code w/o HashKeyBag
+diff --git a/tst/testbugfix/2024-10-11-orbit-hash.tst b/tst/testbugfix/2024-10-11-orbit-hash.tst
+new file mode 100644
+index 0000000000..3735537e6f
+--- /dev/null
++++ b/tst/testbugfix/2024-10-11-orbit-hash.tst
+@@ -0,0 +1,20 @@
++# Fix a bug reported by Leonard Soicher caused by a bug in
++# the hash function for lists of small positive integers.
++gap> n:=280;;
++gap> G:=OnePrimitiveGroup(NrMovedPoints,n,Size,604800*2);
++J_2.2
++gap> blocks := [ [ 1, 2, 3, 28, 108, 119, 155, 198, 216, 226 ],
++> [ 1, 2, 3, 118, 119, 140, 193, 213, 218, 226 ] ];;
++gap> Append(blocks[2],[1..1000]); for i in [1..1000] do Remove(blocks[2]); od;
++gap> Append(blocks[2],[1..1000]); for i in [1..1000] do Remove(blocks[2]); od;
++gap> ForAll(blocks,IsSet);
++true
++gap> orb1:=Orbit(G,blocks[1],OnSets);;
++gap> Length(orb1);
++12096
++gap> orb2:=Orbit(G,blocks[2],OnSets);;
++gap> Length(orb2);
++1008
++gap> orbs:=Orbits(G,blocks,OnSets);;
++gap> List(orbs,Length); # this code gave wrong results
++[ 12096, 1008 ]
diff --git a/sci-mathematics/gap/gap-4.13.1-r1.ebuild b/sci-mathematics/gap/gap-4.13.1-r2.ebuild
similarity index 97%
rename from sci-mathematics/gap/gap-4.13.1-r1.ebuild
rename to sci-mathematics/gap/gap-4.13.1-r2.ebuild
index 45cb0c98749e..49b0fd13f52a 100644
--- a/sci-mathematics/gap/gap-4.13.1-r1.ebuild
+++ b/sci-mathematics/gap/gap-4.13.1-r2.ebuild
@@ -65,7 +65,10 @@ RDEPEND="${DEPEND}"
# packages, use package.provided.
PDEPEND="${REQUIRED_PKGS} !minimal? ( ${AUTOLOADED_PKGS} )"
-PATCHES=( "${FILESDIR}/gap-4.13.1-hash-fixes.patch" )
+PATCHES=(
+ "${FILESDIR}/gap-4.13.1-hash-fixes.patch"
+ "${FILESDIR}/gap-4.13.1-more-hash-fixes.patch"
+)
pkg_setup() {
if use valgrind; then
next reply other threads:[~2024-11-24 14:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-24 14:36 Michael Orlitzky [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-09 13:38 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/gap/files/, sci-mathematics/gap/ Michael Orlitzky
2024-03-19 20:50 Michael Orlitzky
2024-02-05 15:13 Michael Orlitzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1732458836.aa676b404b96cc55e5596728261f37794591dc72.mjo@gentoo \
--to=mjo@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox