• Bug#185462: your timestamp fix breaks package install.

    From Jonas Meurer@1:229/2 to All on Fri Aug 13 16:50:07 2004
    From: [email protected]

    hello,

    as i plan to overtake python-mysqldb, i already prepared an upload that
    depends on libmysqlclient12, but i just recognized, that your patch
    breaks installation on sid systems, with libmysqlclient12 version
    4.0.20-10.

    please test this, before nmu. you could also send me a fixed patch, and
    i'll include it into the upload (which updates to upstream 1.0.0 and has several minor bugs).

    to patch, please use my current package, available at http://people.debian.org/~mejo/python-mysqldb/

    bye
    jonas


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Matthias Urlichs@1:229/2 to All on Fri Aug 13 17:30:15 2004
    From: [email protected]

    Hi,

    Jonas Meurer:
    as i plan to overtake python-mysqldb, i already prepared an upload that

    Ah. Good to know.

    please test this, before nmu. you could also send me a fixed patch, and
    i'll include it into the upload (which updates to upstream 1.0.0 and has several minor bugs).

    "has", or "fixes"?

    http://people.debian.org/~mejo/python-mysqldb/

    Will do ASAP.

    --
    Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [email protected]

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.5 (GNU/Linux)

    iD8DBQFBHNiN8+hUANcKr/kRAgFhAJ0fyuZ0mek9O4WC/fvb3obLvIq1xACggh7V t23rHyHBFgDbi3nLPbTp3Ig=
    =LerF
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Matthias Urlichs@1:229/2 to All on Sat Aug 14 04:10:05 2004
    From: [email protected]

    Hi,

    Jonas Meurer:
    as i plan to overtake python-mysqldb, i already prepared an upload that depends on libmysqlclient12, but i just recognized, that your patch
    breaks installation on sid systems, with libmysqlclient12 version
    4.0.20-10.

    Not on my system; it works flawlessly here. What's happening with yours?

    Anyway, here's my updated patch; I noticed that the "filter()" sub-calls
    are superfluous.

    diff -ru python-mysqldb-1.0.0/debian/patches/02_allow_stringified_timestamps.dpatch python-mysqldb-1.0.0-patched/debian/patches/02_allow_stringified_timestamps.dpatch
    --- python-mysqldb-1.0.0/debian/patches/02_allow_stringified_timestamps.dpatch 2004-08-13 20:46:02 +0200
    +++ python-mysqldb-1.0.0-patched/debian/patches/02_allow_stringified_timestamps.dpatch 2004-08-13 17:16:59 +0200
    @@ -3,7 +3,7 @@
    # (original taken from 01_conffiles.patch from cdrtools package)
    #
    # All lines beginning with `## DP:' are a description of the patch.
    -## DP: take day-part into account at transforming times
    +## DP: allow strings as timestamps

    if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    @@ -22,20 +22,18 @@
    @DPATCH@
    --- python-mysqldb-1.0.0.orig/MySQLdb/times.py
    +++ python-mysqldb-1.0.0/MySQLdb/times.py
    -@@ -26,8 +26,13 @@
    +@@ -26,8 +26,11 @@

    def mysql_timestamp_converter(s):
    """Convert a MySQL TIMESTAMP to a Timestamp object."""
    - s = s + "0"*(14-len(s)) # padding
    - parts = map(int, filter(None, (s[:4],s[4:6],s[6:8],
    - s[8:10],s[10:12],s[12:14])))
    -+ if s[4
  • From Jonas Meurer@1:229/2 to All on Sat Aug 14 05:00:10 2004
    From: [email protected]

    On 14/08/2004 Matthias Urlichs wrote:
    Not on my system; it works flawlessly here. What's happening with yours?

    the sitecompile fails at postinst.

    Anyway, here's my updated patch; I noticed that the "filter()" sub-calls
    are superfluous.

    sorry, but your updated patch doesn't work: jonas@resivo:~/devel/python-mysqldb/python-mysqldb-1.0.0$ patch -p1 < ../patch.diff
    patching file debian/patches/02_allow_stringified_timestamps.dpatch
    Reversed (or previously applied) patch detected! Assume -R? [n] y
    Hunk #2 FAILED at 22.
    1 out of 2 hunks FAILED -- saving rejects to file debian/patches/02_allow_stringified_timestamps.dpatch.rej


    additionally, please attach the patch in future, as it's much easier to
    use it this way.

    sorry, i don't know what you or I messed up, but the patch doesn't work.

    ...dpatch.rej attached.

    bye
    jonas

    ***************
    *** 22,39 ****
    @DPATCH@
    --- python-mysqldb-1.0.0.orig/MySQLdb/times.py
    +++ python-mysqldb-1.0.0/MySQLdb/times.py
    - @@ -26,8 +26,11 @@

    def mysql_timestamp_converter(s):
    """Convert a MySQL TIMESTAMP to a Timestamp object."""
    - s = s + "0"*(14-len(s)) # padding
    - parts = map(int, filter(None, (s[:4],s[4:6],s[6:8],
    - s[8:10],s[10:12],s[12:14])))
    - + if s[4] == '-': ## MySQL 4.1: 2004-01-23 12:34:56
    + s = s + "0"*(19-len(s)) # padding, in case we see only a date
    - + parts = map(int, (s[:4],s[5:7],s[8:10], s[11:13],s[14:16],s[17:19])) - + else: ## MySQL << 4.1: 20040123123456
    + s = s + "0"*(14-len(s)) # padding
    - + parts = map(int, (s[:4],s[4:6],s[6:8], s[8:10],s[10:12],s[12:14]))
    try: return apply(Timestamp, tuple(parts))
    except: return None
    --- 22,41 ----
    @DPATCH@
    --- python-mysqldb-1.0.0.orig/MySQLdb/times.py
    +++ python-mysqldb-1.0.0/MySQLdb/times.py
    + @@ -26,8 +26,13 @@

    def mysql_timestamp_converter(s):
    """Convert a MySQL TIMESTAMP to a Timestamp object."""
    - s = s + "0"*(14-len(s)) # padding
    - parts = map(int, filter(None, (s[:4],s[4:6],s[6:8],
    - s[8:10],s[10:12],s[12:14])))
    + + if s[4] == '-': ## MySQL 4.1
    + s = s + "0"*(19-len(s)) # padding, in case we see only a date
    + + parts = map(int, filter(None, (s[:4],s[5:7],s[8:10],
    + + s[11:13],s[14:16],s[17:19])))
    + + else:
    + s = s + "0"*(14-len(s)) # padding
    + + parts = map(int, filter(None, (s[:4],s[4:6],s[6:8],
    + + s[8:10],s[10:12],s[12:14])))
    try: return apply(Timestamp, tuple(parts))
    except: return None

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1