r16045 - gnucash/trunk/packaging - Conditionally warn the user about file-format changes.

Josh Sled jsled at cvs.gnucash.org
Sat May 5 15:20:36 EDT 2007


Author: jsled
Date: 2007-05-05 15:20:35 -0400 (Sat, 05 May 2007)
New Revision: 16045
Trac: http://svn.gnucash.org/trac/changeset/16045

Modified:
   gnucash/trunk/packaging/gnucash-2.1.x.ebuild
Log:
Conditionally warn the user about file-format changes.


Modified: gnucash/trunk/packaging/gnucash-2.1.x.ebuild
===================================================================
--- gnucash/trunk/packaging/gnucash-2.1.x.ebuild	2007-05-05 17:03:42 UTC (rev 16044)
+++ gnucash/trunk/packaging/gnucash-2.1.x.ebuild	2007-05-05 19:20:35 UTC (rev 16045)
@@ -5,7 +5,7 @@
 # This script should work fine for the whole 2.1.x (and hopefully 2.2.x)
 # releases with a simple rename.
 
-inherit eutils gnome2 
+inherit eutils gnome2 versionator
 
 DOC_VER="2.0.1"
 
@@ -62,7 +62,7 @@
 	built_with_use gnome-extra/libgsf gnome || die "gnome-extra/libgsf must be built with gnome"
 	built_with_use x11-libs/goffice gnome || die "x11-libs/goffice must be built with gnome"
 	if ! built_with_use dev-scheme/guile regex deprecated discouraged; then
-		die "dev-scheme/guile must be built with USE=\"regex deprecated	discouraged\""
+		die "dev-scheme/guile must be built with USE=\"regex deprecated discouraged\""
 	fi
 }
 
@@ -73,9 +73,9 @@
 		myconf="${myconf} --enable-latex-docs"
 	fi
 
-    if [[ "${PV}" != "2.1.0" ]]; then
-        myconf="${myconf} --enable-tax-specific-locale"
-    fi
+	if [[ "${PV}" != "2.1.0" ]]; then
+		myconf="${myconf} --enable-tax-specific-locale"
+	fi
 
 	econf \
 		$(use_enable debug) \
@@ -89,9 +89,9 @@
 	MAKEOPTS="-j1"
 	emake || die "emake failed"
 
-    cd "${WORKDIR}/gnucash-docs-${DOC_VER}"
-    econf || die "doc econf failed"
-    emake || die "doc emake failed"
+	cd "${WORKDIR}/gnucash-docs-${DOC_VER}"
+	econf || die "doc econf failed"
+	emake || die "doc emake failed"
 }
 
 # See http://bugs.gentoo.org/show_bug.cgi?id=132862 regarding gconf schema install
@@ -99,9 +99,9 @@
 src_install() {
 	gnome2_src_install || die "gnome2_src_install failed"
 	dodoc AUTHORS ChangeLog* DOCUMENTERS HACKING INSTALL NEWS TODO README* doc/README*
-    # @fixme: this should use gnucash-icon-48x48.png and art/tango/scaleable/gnucash.svg
-    # http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html#key-icon
-    # http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
+	# @fixme: this should use gnucash-icon-48x48.png and art/tango/scaleable/gnucash.svg
+	# http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html#key-icon
+	# http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
 	make_desktop_entry ${P} "GnuCash ${PV}" gnucash-icon-48x48.png "GNOME;Office;Finance"
 
 	cd "${WORKDIR}/${PN}-docs-${DOC_VER}"
@@ -110,3 +110,11 @@
 		install || die "doc install failed"
 	rm -rf "${D}/var/lib/scrollkeeper"
 }
+
+pkg_postinst() {
+	if $(version_is_at_least "2.1.2" ${PV}); then
+		ewarn "If you are using Scheduled Transactions, the data file saved by "
+		ewarn "GnuCash >=2.1.2 is NOT backward-compatible with GnuCash 2.0."
+		ewarn "Please make a safe backup of your 2.0 data before upgrading to 2.1.2."
+	fi
+}



More information about the gnucash-changes mailing list