Bug 2323303

Summary: gnucash python bindings trash the accounting file
Product: [Fedora] Fedora Reporter: Jonathan Corbet <corbet>
Component: gnucashAssignee: Gwyn Ciesla <gwync>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 40CC: gwync
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gnucash-5.9-3.fc40 gnucash-5.9-3.fc41 gnucash-5.9-3.el9 gnucash-5.9-3.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-13 02:59:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Corbet 2024-11-01 21:46:43 UTC
With gnucash 5.9, opening an existing accounting file with the Python bindings 
will cause the file to be wiped out and reset, even if gnucash.SessionOpenMode.SESSION_READ_ONLY is specified.  This has a certain 
tendency to cause heart palpitations and general panic as years of accounting
data vanish in an instant.

Let's hear it for backups.

This problem is fixed by commit 6cabb5d88433049bbc9caff8d0ff72f03009d30c in the 
upstream gnucash repository.

Reproducible: Always

Steps to Reproduce:
1. Run your Python program to access the accounting file
2. Observe that said file is not empty
3. Consider a career change
Actual Results:  
The accounting file is reinitialized and all data is gone.

Expected Results:  
Load the file as expected.

I suggest backporting the upstream fix if they don't do a release quickly.

Comment 1 Gwyn Ciesla 2024-11-04 14:54:29 UTC
I'll get an update out ASAP.

Comment 2 Gwyn Ciesla 2024-11-04 19:12:07 UTC
Updates incoming. Sorry for the delay, I had a minor tooling snafu.

And please don't change careers, I enjoy your work. :)

Comment 3 Fedora Update System 2024-11-04 19:16:36 UTC
FEDORA-EPEL-2024-fa091733fd (gnucash-5.9-3.el9) has been submitted as an update to Fedora EPEL 9.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-fa091733fd

Comment 4 Fedora Update System 2024-11-04 19:16:37 UTC
FEDORA-2024-49ad736471 (gnucash-5.9-3.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-49ad736471

Comment 5 Fedora Update System 2024-11-04 19:16:38 UTC
FEDORA-2024-e23ea54de5 (gnucash-5.9-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e23ea54de5

Comment 6 Fedora Update System 2024-11-05 04:12:18 UTC
FEDORA-2024-e23ea54de5 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-e23ea54de5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-e23ea54de5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-11-05 04:46:03 UTC
FEDORA-2024-49ad736471 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-49ad736471`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-49ad736471

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-11-05 05:35:53 UTC
FEDORA-EPEL-2024-fa091733fd has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-fa091733fd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-11-05 06:52:22 UTC
FEDORA-2024-b82b96507d has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-b82b96507d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-b82b96507d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Jonathan Corbet 2024-11-05 15:48:05 UTC
I have tested the update on my F40 system and the problem is indeed fixed - thanks!

Comment 11 Gwyn Ciesla 2024-11-05 15:50:32 UTC
Excellent!

Comment 12 Fedora Update System 2024-11-13 02:59:10 UTC
FEDORA-2024-b82b96507d (gnucash-5.9-3.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2024-11-13 03:11:57 UTC
FEDORA-2024-e23ea54de5 (gnucash-5.9-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2024-11-13 17:29:33 UTC
FEDORA-EPEL-2024-fa091733fd (gnucash-5.9-3.el9) has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2024-11-13 17:36:48 UTC
FEDORA-2024-49ad736471 (gnucash-5.9-3.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.