diff -u pysol-4.82.1/debian/control pysol-4.82.1/debian/control --- pysol-4.82.1/debian/control +++ pysol-4.82.1/debian/control @@ -1,7 +1,7 @@ Source: pysol Section: games Priority: optional -Build-Depends: debhelper (>= 4), python-dev +Build-Depends: debhelper (>= 4), python-dev, dpatch, Build-Depends-Indep: python-support (>= 0.3) Maintainer: Ubuntu MOTU Developers XSBC-Original-Maintainer: Alexander Nofftz diff -u pysol-4.82.1/debian/rules pysol-4.82.1/debian/rules --- pysol-4.82.1/debian/rules +++ pysol-4.82.1/debian/rules @@ -7,16 +7,22 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +PACKAGES=pysol TMPDIR = $(shell pwd)/debian/pysol -build: -build-stamp: +include /usr/share/dpatch/dpatch.make + +build: build-stamp + +build-stamp: patch dh_testdir touch build-stamp -clean: +clean: clean-patched unpatch +clean-patched: dh_testdir dh_testroot + rm -rf debian/pysol debian/files debian/substvars rm -f build-stamp rm -f *.py[co] dh_clean diff -u pysol-4.82.1/debian/changelog pysol-4.82.1/debian/changelog --- pysol-4.82.1/debian/changelog +++ pysol-4.82.1/debian/changelog @@ -1,3 +1,15 @@ +pysol (4.82.1-4.1ubuntu6) gutsy; urgency=low + + [ Edoardo Batini ] + * Custom user options are now loaded when application starts (LP: #39975) + - 01_patch_for_bug_39975. + * Added dpatch to Build-Depends + + [ Scott Kitterman ] + * Modified debian/rules to add dpatch patch system + + -- Edoardo Batini Sun, 29 Apr 2007 20:26:56 +0200 + pysol (4.82.1-4.1ubuntu5) feisty; urgency=low * The "oops, missed a spot" release only in patch2: unchanged: --- pysol-4.82.1.orig/debian/patches/01_patch_for_bug_39975.dpatch +++ pysol-4.82.1/debian/patches/01_patch_for_bug_39975.dpatch @@ -0,0 +1,39 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_patch_for_bug_39975.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Solving custom options persistance + +@DPATCH@ + +diff -Nru ../../pysol-4.82.1/src/app.py ../../tmp/pysol-4.82.1/src/app.py +--- ../../pysol-4.82.1/src/app.py 2007-04-29 23:57:27.000000000 +0200 ++++ ../../tmp/pysol-4.82.1/src/app.py 2007-04-29 23:58:42.000000000 +0200 +@@ -408,8 +408,26 @@ + + # the PySol mainloop + def mainloop(self): ++ ## Following code added to solve: ++ ## - launchpad bug #39975 ++ ## - debbugs #418546 ++ ## class Option in app.py uses int values 0, 1 to set user preferences. ++ ## When user change a preference in a checkbox that value was changed to boolean True or False ++ ## and stored in self.fn.opt (~/.pysol/options.dat) ++ ## That's why only two_values options were giving problems. ++ ## Hacked to convert back each boolean to 0 or 1 from custom options file so that Pysol accept that values. ++ try: ++ options = unpickle(self.fn.opt) ++ for k in options.__dict__.keys(): ++ if options.__dict__[k] == False: ++ setattr(options, k, 0) ++ elif options.__dict__[k] == True: ++ setattr(options, k, 1) ++ self.opt = options ++ except: ++ self.startup_opt =self.opt.copy() + # copy startup options +- self.startup_opt = self.opt.copy() ++ + # try to load statistics + try: self.loadStatistics() + except: pass only in patch2: unchanged: --- pysol-4.82.1.orig/debian/patches/00list +++ pysol-4.82.1/debian/patches/00list @@ -0,0 +1 @@ +01_patch_for_bug_39975.dpatch