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

Re: Bug#593544: gnucash: Upgrade from Debian Lenny looses Online Banking (AqBanking) settings



Hi Release Team,

Micha Lenk schrieb:
> To avoid countless bug reports on Gnucash once Debian Squeeze is released I
> would like to backport this patch for the Gnucash package in Squeeze. I believe
> this will be fairly easy because there were very few changes to the aqbanking
> plugin since Gnucash 2.2.9 has been released. However, I would like to get
> approval from the Debian Release team in advance, that this patch will be
> accepted as freeze exception for Debian Squeeze.

Please see the attached debdiff of the changes that I would like to make
to the package in Squeeze (via unstable). Please approve for upload.

Regards,
Micha
diff -u gnucash-2.2.9/debian/changelog gnucash-2.2.9/debian/changelog
--- gnucash-2.2.9/debian/changelog
+++ gnucash-2.2.9/debian/changelog
@@ -1,3 +1,10 @@
+gnucash (2.2.9-7) unstable; urgency=low
+
+  * Added patch 11_migrate_AqBanking_configuration_bug_593544.dpatch for
+    migrating old AqBanking configuration on upgrade (closes: #593544).
+
+ -- Micha Lenk <micha@debian.org>  Thu, 19 Aug 2010 09:40:23 +0200
+
 gnucash (2.2.9-6) unstable; urgency=low
 
   * Added patch 10_fix_broken_SCIM_input_bug_587298 to fix SCIM input
diff -u gnucash-2.2.9/debian/patches/00list gnucash-2.2.9/debian/patches/00list
--- gnucash-2.2.9/debian/patches/00list
+++ gnucash-2.2.9/debian/patches/00list
@@ -5,0 +6 @@
+11_migrate_AqBanking_configuration_bug_593544.dpatch
only in patch2:
unchanged:
--- gnucash-2.2.9.orig/debian/patches/11_migrate_AqBanking_configuration_bug_593544.dpatch
+++ gnucash-2.2.9/debian/patches/11_migrate_AqBanking_configuration_bug_593544.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+Description: Check for and migrate old AqBanking configuration on first start
+Author: Bill Nottingham <notting@redhat.com>
+Origin: http://lists.gnucash.org/pipermail/gnucash-devel/2010-August/029265.html
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593544
+Applied-Upstream: http://lists.gnucash.org/pipermail/gnucash-changes/2010-August/008558.html
+
+@DPATCH@
+
+diff --git a/src/import-export/aqbanking/gnc-ab-utils.c b/src/import-export/aqbanking/gnc-ab-utils.c
+index 0133c8a..1b43b01 100644
+--- a/src/import-export/aqbanking/gnc-ab-utils.c
++++ b/src/import-export/aqbanking/gnc-ab-utils.c
+@@ -120,6 +120,29 @@ gnc_AB_BANKING_new(void)
+         api = AB_Banking_new("gnucash", NULL, 0);
+         g_return_val_if_fail(api, NULL);
+ 
++#ifdef AQBANKING_VERSION_4_PLUS
++        /* Check for config migration */
++        if (AB_Banking_HasConf4(api, 0) != 0)
++        {
++            if (AB_Banking_HasConf3(api, 0) == 0)
++            {
++                g_message("gnc_AB_BANKING_new: importing aqbanking3 configuration\n");
++                if (AB_Banking_ImportConf3(api, 0) < 0)
++                {
++                    g_message("gnc_AB_BANKING_new: unable to import aqbanking3 configuration\n");
++                }
++            }
++            else if (AB_Banking_HasConf2(api, 0) == 0)
++            {
++                g_message("gnc_AB_BANKING_new: importing aqbanking2 configuration\n");
++                if (AB_Banking_ImportConf2(api, 0) < 0)
++                {
++                    g_message("gnc_AB_BANKING_new: unable to import aqbanking2 configuration\n");
++                }
++            }
++        } 
++#endif /* AQBANKING_VERSION_4_PLUS */        
++        
+         /* Init the API */
+         g_return_val_if_fail(AB_Banking_Init(api) == 0, NULL);
+ 

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: