pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/finance/gnucash



Module Name:    pkgsrc
Committed By:   wiz
Date:           Fri Jul  5 08:08:02 UTC 2024

Modified Files:
        pkgsrc/finance/gnucash: Makefile distinfo
Added Files:
        pkgsrc/finance/gnucash/patches: patch-libgnucash_engine_Account.cpp

Log Message:
gnucash: fix crash when editing/deleting accounts using upstream patch

>From upstream.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.351 -r1.352 pkgsrc/finance/gnucash/Makefile
cvs rdiff -u -r1.123 -r1.124 pkgsrc/finance/gnucash/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/finance/gnucash/patches/patch-libgnucash_engine_Account.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/finance/gnucash/Makefile
diff -u pkgsrc/finance/gnucash/Makefile:1.351 pkgsrc/finance/gnucash/Makefile:1.352
--- pkgsrc/finance/gnucash/Makefile:1.351       Sun Jun 30 22:17:32 2024
+++ pkgsrc/finance/gnucash/Makefile     Fri Jul  5 08:08:01 2024
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.351 2024/06/30 22:17:32 wiz Exp $
+# $NetBSD: Makefile,v 1.352 2024/07/05 08:08:01 wiz Exp $
 
 DISTNAME=              gnucash-5.7
+PKGREVISION=           1
 CATEGORIES=            finance
 MASTER_SITES=          ${MASTER_SITE_GITHUB:=gnucash/}
 GITHUB_RELEASE=                ${PKGVERSION_NOREV}

Index: pkgsrc/finance/gnucash/distinfo
diff -u pkgsrc/finance/gnucash/distinfo:1.123 pkgsrc/finance/gnucash/distinfo:1.124
--- pkgsrc/finance/gnucash/distinfo:1.123       Sun Jun 30 22:17:32 2024
+++ pkgsrc/finance/gnucash/distinfo     Fri Jul  5 08:08:01 2024
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.123 2024/06/30 22:17:32 wiz Exp $
+$NetBSD: distinfo,v 1.124 2024/07/05 08:08:01 wiz Exp $
 
 BLAKE2s (gnucash-5.7.tar.bz2) = 60c09b57473dda7828ed6f9f0c8bfab275bef01c4602a737715a28462f294c7f
 SHA512 (gnucash-5.7.tar.bz2) = 151f6f35f5f53091f544a070cbdbf5724e99b4429f575fd3d38b27f19d1fc616fa4c050e4b66708d5b881f8c115f0770865ddca85bfba4e2fab5f70daf7e2fac
 Size (gnucash-5.7.tar.bz2) = 14988224 bytes
+SHA1 (patch-libgnucash_engine_Account.cpp) = 3e77249f95da8a1589bfabc610a6b14c57ff2c43

Added files:

Index: pkgsrc/finance/gnucash/patches/patch-libgnucash_engine_Account.cpp
diff -u /dev/null pkgsrc/finance/gnucash/patches/patch-libgnucash_engine_Account.cpp:1.1
--- /dev/null   Fri Jul  5 08:08:02 2024
+++ pkgsrc/finance/gnucash/patches/patch-libgnucash_engine_Account.cpp  Fri Jul  5 08:08:01 2024
@@ -0,0 +1,30 @@
+$NetBSD: patch-libgnucash_engine_Account.cpp,v 1.1 2024/07/05 08:08:01 wiz Exp $
+
+commit 60ccca017f1be3af2caebb8a9d0c82a197f1da4f
+Author: John Ralls <jralls%ceridwen.us@localhost>
+Date:   Mon Jul 1 21:28:43 2024 -0700
+
+    Bug 799347 - Edit account to make it sub account under other account
+
+    Send QOF_EVENT_REMOVE on the child before actually removing it from
+    the children vector so that the stored indexes are valid long enough
+    to clear them.
+
+--- libgnucash/engine/Account.cpp.orig 2024-06-27 20:21:49.000000000 +0000
++++ libgnucash/engine/Account.cpp
+@@ -2859,11 +2859,13 @@ gnc_account_remove_child (Account *paren
+     ed.node = parent;
+     ed.idx = gnc_account_child_index (parent, child);
+ 
++    // First send the event before we invalidate everything in children.
++    qof_event_gen(&child->inst, QOF_EVENT_REMOVE, &ed);
++
++    // Then remove the child and release its memory.
+     ppriv->children.erase (std::remove (ppriv->children.begin(), ppriv->children.end(), child),
+                            ppriv->children.end());
+ 
+-    /* Now send the event. */
+-    qof_event_gen(&child->inst, QOF_EVENT_REMOVE, &ed);
+ 
+     /* clear the account's parent pointer after REMOVE event generation. */
+     cpriv->parent = nullptr;



Home | Main Index | Thread Index | Old Index