From 15605efd241afcba9a8541fda72a724ee724581e Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Tue, 3 Aug 2010 17:48:47 +0300 Subject: [PATCH 1/6] Update changelog for .903 snapshot --- packaging/debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 0616ad0e..0a27920a 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,9 @@ +free-poker-tools (0.20.903-1) unstable; urgency=low + + * .903 snapshot release + + -- Mika Bostrom Tue, 03 Aug 2010 17:47:41 +0300 + free-poker-tools (0.20.902-1) unstable; urgency=low * New snapshot release; .901 was broken for FTP From 9bfe110e46b6a4e7169f2a8c3c29ceebf8d51a02 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Sat, 14 Aug 2010 09:24:45 +0300 Subject: [PATCH 2/6] Bump changelog for .904 snapshot --- packaging/debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 0a27920a..2bd7df9b 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,9 @@ +free-poker-tools (0.20.904-1) unstable; urgency=low + + * .904 snapshot release + + -- Mika Bostrom Sat, 14 Aug 2010 09:24:25 +0300 + free-poker-tools (0.20.903-1) unstable; urgency=low * .903 snapshot release From 62ddab3232ee177134af8811747b93801887a599 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Sat, 14 Aug 2010 09:29:07 +0300 Subject: [PATCH 3/6] makeexe.py has been removed --- packaging/debian/rules | 1 - 1 file changed, 1 deletion(-) diff --git a/packaging/debian/rules b/packaging/debian/rules index 9106c7bc..58b1136b 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -27,7 +27,6 @@ install: build cp pyfpdb/*.pyw debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/ # Remove scripts that are only useful in win32 rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb//windows_make_bats.py - rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/makeexe.py rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/py2exe_setup.py From c49565fcb18b770817a82aec155dc70d547580ac Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Tue, 17 Aug 2010 07:56:00 +0300 Subject: [PATCH 4/6] Fix config file copying for debian package If there is no config file in ~/.fpdb/ copy it from the package's /usr/share path --- pyfpdb/Configuration.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 618d27da..ae578f57 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -84,6 +84,13 @@ def get_config(file_name, fallback = True): # print "config path 2=", config_path if os.path.exists(config_path): return (config_path,False) + # Copy from example (debian package) + try: + example_path = '/usr/share/python-fpdb/' + file_name + '.example' + shutil.copyfile(example_path, config_path) + return (config_path,False) + except IOError: + pass # No file found if not fallback: From f18cc00c0d1e7055eb34cdd2f9f8739903ce5b2f Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Tue, 17 Aug 2010 08:18:46 +0300 Subject: [PATCH 5/6] Move sample copying after fallback test Only try to copy the example HUD_config.xml after fallback has been tested against, and even then only on platform where the debian path can exist --- pyfpdb/Configuration.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index ae578f57..d1f0efec 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -84,18 +84,26 @@ def get_config(file_name, fallback = True): # print "config path 2=", config_path if os.path.exists(config_path): return (config_path,False) - # Copy from example (debian package) - try: - example_path = '/usr/share/python-fpdb/' + file_name + '.example' - shutil.copyfile(example_path, config_path) - return (config_path,False) - except IOError: - pass # No file found if not fallback: return (False,False) +# Example configuration for debian package + if os.name == 'posix': + # If we're on linux, try to copy example from the place + # debian package puts it; get_default_config_path() creates + # the config directory for us so there's no need to check it + # again + example_path = '/usr/share/python-fpdb/' + file_name + '.example' + try: + shutil.copyfile(example_path, config_path) + msg = 'Configuration file created: %s\n' % config_path + logging.info(msg) + return (config_path,False) + except IOError: + pass + # OK, fall back to the .example file, should be in the start dir if os.path.exists(file_name + ".example"): try: From f1b051a99a9952595faa7bf709184ed4c2b0acca Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Tue, 17 Aug 2010 08:25:23 +0300 Subject: [PATCH 6/6] Update changelog --- packaging/debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 2bd7df9b..49211161 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,9 @@ +free-poker-tools (0.20.904-2) unstable; urgency=low + + * On fpdb start, copy example HUD_config.xml in place if none is present + + -- Mika Bostrom Tue, 17 Aug 2010 08:23:31 +0300 + free-poker-tools (0.20.904-1) unstable; urgency=low * .904 snapshot release